3 ms·
Apparently the first solution is the correct according to the RFC: http://www.ietf.org/rfc/rfc4627.txt http://www.ietf.org/rfc/rfc4627.txt To escape an extende
by olavk 15y ago
Apparently the first solution is the correct according to the RFC: http://www.ietf.org/rfc/rfc4627.txt http://www.ietf.org/rfc/rfc4627.txt
To escape an extended character that is not in the Basic Multilingual Plane, the character is represented as a twelve-character sequence, encoding the UTF-16 surrogate pair.
This is regardless of whether the json itself is UTF-8 or UTF-16 encoded.