2 ms·
The thing is that JSON doesn't actually require or otherwise specify UTF-8. A JSON encoding is defined as a sequence of unicode codepoints: it doesn't actually
by ctz 13y ago
The thing is that JSON doesn't actually require or otherwise specify UTF-8. A JSON encoding is defined as a sequence of unicode codepoints: it doesn't actually tell you how to send those over the wire. You have to do that yourself, and specify the encoding out of band somehow.
If JSON did actually specify UTF-8 and provided a sensible escape mechanism for the whole of unicode, this would be an improvement, because it would turn JSON into an actual standard data-exchange format, rather than a textual encoding of its infoset.