Strings and Unicode
03Quotes delimit strings; escapes represent special characters without changing the intended string value.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
DIAGRAM§ 7 ↗
RFC 8259 · § 7EXAMPLE
3 / 3
03
Encode interoperable network text.
Use UTF-8 and omit a leading byte-order mark in transmitted JSON.
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
RFC 7159 character-encoding guidanceRFC 8259 §8.1
RFC 8259 requires UTF-8 for JSON exchanged between systems outside a closed ecosystem. Earlier JSON specifications did not require a single encoding.
Read the updated RFC section ↗Compare decoded strings and exchange UTF-8.
- Quotation marks, reverse solidus, and control characters U+0000–U+001F must be escaped inside strings.
- Escapes such as \u005C represent Unicode code units; non-BMP characters can use a UTF-16 surrogate pair. Unpaired surrogates harm interoperability.
- JSON exchanged outside a closed ecosystem must use UTF-8. Do not add a byte-order mark to network-transmitted JSON.
Different escape spellings can represent the same string. Compare decoded code-unit sequences, rather than raw escape text. A parser may ignore a received BOM for interoperability.
Read the RFC section ↗Diagrams simplify the RFC. Read the linked sections for complete requirements.
Privacy