Numbers and precision
04The grammar allows decimal numbers with optional minus, fraction, and exponent, but implementations have numeric limits.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
DIAGRAM§ 6 ↗
RFC 8259 · § 6EXAMPLE
3 / 3
03
Respect the receiving numeric model.
A valid token can still exceed the receiver’s range or lose expected precision.
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
Read the updated RFC section ↗
Choose numeric ranges the receiver can represent.
- Leading zeroes, NaN, and Infinity are not valid JSON number forms. A leading plus is not allowed.
- Parsers may limit accepted magnitude and precision; a syntactically valid token such as 1E400 can exceed common capabilities.
- With IEEE 754 binary64 implementations, integers from −(2^53)+1 through (2^53)−1 are interoperable with exact agreement.
The RFC describes broad interoperability, not a promise that every runtime accepts the same arbitrary-precision numbers. Applications needing large identifiers often define a string representation in their own schema.
Read the RFC section ↗Diagrams simplify the RFC. Read the linked sections for complete requirements.
Privacy