JSON (JavaScript Object Notation) is a lightweight data-interexchange format. Prior to JSON, XML was the most commonly used data inter-exchange format. XML still has its dominance. But JSON is also gaining up because of its simplicity. JSON represents the data as string:value pairs, where the value can be string, numbers, arrays, boolean values or even null value.
Take for example
1. string: number
{ "rollnumber": 1 }
2. string: string
{ "sitename": "programming" }
3. string: boolean value
{ "student" : true }
4. string: array
[js]
{
"tags" : [
"cpp",
"c",
"PHP"
]
}
[/js]
5. string:object (Note that object is nothing but any of the four representations shown above)
[js]
{
"site": {
"sitename": "programming",
"tags": [
"cpp",
"c",
"PHP"
]
}
}
[/js]
https://linuxprograms.wordpress.com/2010/05/20/introduction-to-json/