JSON data is written as name/value pairs, similar to JavaScript object properties.
Each name/value pair consists of a field name (in double quotes), followed by a colon, and then the value.
“firstName”:“John” |
In JSON, names must be enclosed in double quotes, whereas in JavaScript, names do not require quotes. |
JSON objects are enclosed in curly braces.
Similar to JavaScript, objects can contain multiple name/value pairs.
{“firstName”:“John”, “lastName”:“Doe”} |