News for hackers. Stuff that matters.
Re:Amazon open-sources Ion – a binary and text interchangabl... by jrgv on Friday April 22, 2016 @03:44AM (#11547621)
> But if we take it to mean code point, then if the value is a surrogate… what should happen?

Surrogates are code points. The spec does not say what should happen if the surrogate is invalid (for example, if only the first surrogate of a surrogate pair is present), but neither does the JSON spec.

Java internally also represents non-BMP code points using surrogates. So, simply appending the surrogates to the string should yield a valid Java string if the surrogates in the input are valid.

There are no comments on this comment yet.