RFC 8259: The JSON Standard
RFC 8259 (published December 2017) is the authoritative IETF Internet Standard for the JSON data interchange format. It is co-published with ISO/IEC 21778:2017 and technically equivalent to ECMA-404.
Key Requirements of RFC 8259
- Encoding: JSON text MUST be UTF-8 encoded.
- Double quotes only: String values and object keys must use double quotes (
"). - No comments: JSON does not define any comment syntax.
- No trailing commas: A comma after the last element in an object or array is illegal.
- No leading zeros: Numbers like
0123are invalid. - No NaN or Infinity: These IEEE 754 values have no JSON representation.
- Lowercase literals:
true,false, andnullmust be lowercase.
RFC 8259 History
- RFC 4627 (2006) — Original JSON specification by Douglas Crockford.
- RFC 7159 (2014) — First revision, clarified interoperability.
- RFC 8259 (2017) — Current standard, mandates UTF-8.
// RFC 8259 Compliance Examples
// ✅ Valid RFC 8259 JSON:
{
"name": "Alice",
"age": 30,
"active": true,
"data": null,
"roles": ["admin", "editor"]
}
// ❌ Invalid under RFC 8259:
{
'name': 'Alice', // ❌ Single quotes
age: 30, // ❌ Unquoted key
"items": [1, 2,], // ❌ Trailing comma
"val": 0123, // ❌ Leading zero
// comment // ❌ Comment
"nan": NaN // ❌ NaN is not JSON
}