JSON data types: a complete reference
string, number, boolean, null, array, object — what's allowed in each, with edge cases.
Strings
Sequences of Unicode code points enclosed in double quotes. Use escape sequences for control characters and quotes.
Numbers
Integers or floats in standard notation. No NaN, no Infinity, no leading zeros, no plus sign before the integer part. Languages may parse very large numbers as floats and lose precision — for IDs prefer strings.
Booleans
Lowercase true or false.
null
Lowercase null. Distinct from missing — { "x": null } has the key, {} does not.
Arrays
Ordered list in square brackets, comma-separated, may mix types. Empty array is [].
Objects
Unordered (in spec) collection of double-quoted string keys mapped to values. Keys should be unique. Empty object is {}.