In JSON, values can be one of the following types:
|
JSON values cannot be of the following types:
|
In JSON, strings must be enclosed in double quotes.
| {“name”:“John”} |
In JSON, numbers must be either integers or floating-point values.
| {“age”:30} |
In JSON, values can include objects.
| { “employee”:{“name”:“John”, “age”:30, “city”:“New York”} } |
| In JSON, objects used as values must adhere to JSON syntax rules. |
In JSON, values can consist of arrays.
| { “employees”:[“John”, “Anna”, “Peter”] } |
In JSON, values can be either true or false.
| {“sale”:true} |
In JSON, values can also be null.
| {“middlename”:null} |