Understand JSON syntax and data types
JSON (JavaScript Object Notation) is a language-independent data format used for structured data. It supports three types of values:
- Simple values: Strings, numbers, booleans, and
null. Note thatundefinedis not a valid JSON value. - Objects: Unordered sets of name/value pairs (keys must be strings).
- Arrays: Ordered lists of values of any type, including other objects or arrays.
JSON does not support variables, functions, or object instances.