JSON Example
{
"employees": [
{ "firstName":"John" , "lastName":"Doe" },
{ "firstName":"Anna" , "lastName":"Smith" },
{ "firstName":"Peter" , "lastName":"Jones" }
]
}
JSON syntax is a subset of the JavaScript object notation syntax:
Data is in name/value pairs
Data is separated by commas
Curly braces hold objects
Square brackets hold arrays
JSON values can be:
A number (integer or floating point)
A string (in double quotes)
A Boolean (true or false)
An array (in square brackets)
An object (in curly brackets)
null
{
"Authors": [
{ "First_Name":"Jeffrey" , "Last_Name":"Ullman" },
{ "First_Name":"Jennifer" , "Last_Name":"Widom" },
{ "First_Name":"Hector" , "Last_Name":"Garcia" }
]
}