JSON Structure Guide
A comprehensive reference for the JavaScript Object Notation (JSON) format.
What is JSON?
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write, and strictly follows the RFC 8259 standard.
Data Types
JSON supports the following native data types:
- StringA sequence of characters enclosed in double quotes (e.g.,
"Hello"). - NumberInteger or floating-point (e.g.,
42,3.14). - Boolean
trueorfalse. - NullRepresents an empty value (
null). - ArrayAn ordered list of values enclosed in square brackets (
[]). - ObjectA collection of key/value pairs enclosed in curly braces (
{ }).
Syntax Rules
{
"string": "Keys must be double-quoted strings",
"number": 123,
"boolean": true,
"null_value": null,
"array": [
"No trailing commas are allowed in the last item",
2
],
"object": {
"nested": "structures work fine"
}
}Specifications & Standards
JSON is defined by several standards that have evolved over time. While they are mostly identical, understanding the differences can be helpful for strict compliance.
CurrentRFC 8259
The current IETF standard that obsoletes RFC 7159. It specifies the application/json media type and defines JSON as a data-interchange format.
RFC 7159 & RFC 4627
Earlier versions of the JSON specification. RFC 7159 unified multiple previous documents, while RFC 4627 was the original RFC that first registered the media type.
ECMA-404
The Ecma International standard (4th edition, 2017) defines the syntax of JSON. It is 100% compatible with RFC 8259.
View ECMA-404 Standard