Search code examples
jsonencodinglanguage-specifications

JSON encoding details


I was reading JSON's succinct language specification and got surprised for this sentence:

Excepting a few encoding details, that completely describes the language.

What are the details which can break those simple rules.


Solution

  • See RFC 4627 for the full specification. Specifically related to encoding:

    JSON text SHALL be encoded in Unicode. The default encoding is UTF-8.

    If your text isn't Unicode, it isn't JSON.