A tree of JSON values
01A JSON text is one value with optional surrounding whitespace, and that value can contain nested values.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
DIAGRAM§ 2 ↗
RFC 8259 · § 2EXAMPLE
3 / 3
03
Reach primitive values.
Strings, numbers, booleans, and null terminate branches of the tree.
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
Read the updated RFC section ↗
JSON is data with a small grammar.
- Values are object, array, number, string, true, false, or null. Literal names are lowercase.
- A top-level text can be any JSON value, including a scalar.
- Only space, tab, carriage return, and line feed are insignificant JSON whitespace. Comments and trailing commas are outside the grammar.
JSON syntax is language-independent. A JavaScript expression that happens to resemble JSON can still be invalid JSON.
Read the RFC section ↗Diagrams simplify the RFC. Read the linked sections for complete requirements.
Privacy