JSON example

Below is some JSON Example that will help you to better understand about JSON.

JSON Object Example

{  
    "Person": {  
        "name" : "Racks",   
        "age" : 10,
        "married" : true  
    }  
}

JSON Array Example

["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]

JSON example or JSON file example

{
    "firstName": "Racks",
    "lastName": "Jacson",
    "gender": "man",
    "age": 24,
    "address": {
        "streetAddress": "Udhna",
        "city": "San Jone",
        "state": "CA",
        "postalCode": "95221"
    },
    "phoneNumbers": [
        { "type": "home", "number": "27627" }
    ]
}

You can also check JSON to XML on below link.

https://tools.learningcontainer.com/json-to-xml/

You can refer below some article.

 

PHP Code Snippets Powered By : XYZScripts.com