{}JSON FYI

JSON data types: a complete reference

string, number, boolean, null, array, object — what's allowed in each, with edge cases.

·6 min read

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 {}.

Frequently asked questions

Are dates a JSON type?+

No. Encode them as ISO 8601 strings: "2025-04-21T12:00:00Z".

Are integers and floats different types?+

Not in JSON itself — both are 'number'. Some parsers preserve the distinction; many don't.

Related tools & guides