String, Number, and Boolean

Strings are any sequence of Unicode characters enclosed in double quotes. Numbers are integers or floating-point values with no quotes, no leading zeros. Booleans are true or false, lowercase exactly. Very large integers may lose precision in parsers that use floating-point to represent all numbers.

Null

null represents an intentionally absent value. It's different from an absent key (which means the key doesn't exist) and from an empty string. null explicitly communicates 'this value is known to not exist.' It's useful for optional fields where absence versus non-existence matters semantically.

Object

An object is an unordered collection of key-value pairs where keys are strings and values can be any JSON type. Keys within an object should be unique — duplicate keys are technically parsed by most parsers but with undefined behavior regarding which value wins.

Array

An array is an ordered sequence of values, which can be of mixed types. Arrays can contain other arrays, creating matrices or nested structures. Unlike objects, arrays are ordered — the sequence of elements is meaningful and preserved.

Key Takeaway

Mastering JSON's six types — string, number, boolean, null, object, and array — gives you complete fluency with the format. Pay special attention to number precision, null semantics, and key uniqueness.