JSON Example


Prev Tutorial Next Tutorial

JSON Example

JSON example can be created by using object and array. Each object contain different data such as text, number, boolean etc.

JSON Object Example

Example

{  
  "employee": {  
  "name":  "Gaurav",   
  "salary":  30000,   
  "married":  true  
  }  
}  

JSON array Example

Example

{"employees":[  
    {"name":"Gaurav", "email":"gauravrawat18@gmail.com"},  
    {"name":"Sultan", "email":"sultanalam786@gmail.com"},  
    {"name":"Hitesh", "email":"hitesh.kast@gmail.com"}  
]}  

JSON Example

Example

{"employees":[  
    {"name":"Gaurav", "email":"gauravrawat18@gmail.com"},  
    {"name":"Sultan", "email":"sultanalam786@gmail.com"},  
    {"name":"Hitesh", "email":"hitesh.kast@gmail.com"}  
]}  

You can represent above example in xml like below;

Example

<employees>  
    <employee>
        <name>Gaurav</name>
        <email>gauravrawat18@gmail.com</email>
    </employee>
    <employee>
        <name>Sultan</name>
        <email>sultanalam786@gmail.com</email>
    </employee>
    <employee>
        <name>Hitesh</name>
        <email>hitesh.kast@gmail.com</email>  
    </employee> 
</employees>

Prev Tutorial Next Tutorial

Google Advertisements
Download Projects

Google Adsense Advertisements
Free Classified Site – Bedpage

Yahoo Advertisements