Syntax of JSON is similar to JavaScript syntax, as JSON is subset of
JavaScript. Syntax in JSON has data that is represented in name/value pairs.
Standard for syntax in JSON:
- Data in JSON is represented in name/value pairs.
- Inside curly bracket object and names are followed by ‘ ’ (colon), the name and value are separated by , (comma).
- Square holds values and arrays separated by, (comma).
Example:
{
"cars"
[{
"name" : "Mercedis",
"color" : "Red",
"price" : "$5087890"
},
{"name" : "BMW",
"color" : "Black",
"price" : "$72893205"
}]
}
No comments:
Post a Comment