JSON Example

JSON case can be made by object and array. Every object can have diverse information, for example, content, number, boolean and so forth. How about we see distinctive JSON illustrations utilizing object and array.

JSON Object Example

Example

{ "employee": { "name": "Mithilesh", "salary": 50000, "married": true } }

JSON array Example

Example

		{"employees":[  
    {"name":"Mithilesh", "email":"mithileshgniit@gmail.com"},  
    {"name":"harish", "email":"harishsharma@gmail.com"},  
    {"name":"sumant", "email":"sumant@gmail.com"}  
]} 

You can represent above example in xml like this.

<employees>  
    <employee>
        <name>Mithilesh</name>
        <email>mithileshgniit@gmail.com</email>
    </employee>
    <employee>
        <name>harish</name>
        <email>harishsharma@gmail.com</email>
    </employee>
    <employee>
        <name>sumant</name>
        <email>sumant@gmail.com</email>  
    </employee> 
</employees>