diff --git a/why-not-json.md b/why-not-json.md index 9fc1f86..d8706bf 100644 --- a/why-not-json.md +++ b/why-not-json.md @@ -97,6 +97,13 @@ Some examples: - which, if any, of `{"a":1, "a":2}`, `{"a":1}` and `{"a":2}` are the same? Are all three legal? - are `{"päron":1}` and `{"päron":1}` the same or different? + - is `"\uD834"` a legal string? Is `"\uDD1E"`?[^unpaired-surrogates] + +[^unpaired-surrogates]: + [Section 8.2 of RFC 8259](https://tools.ietf.org/html/rfc8259#section-8.2) + discusses *unpaired UTF-16 surrogate* code points such as these, and + remarks that implementations differ in their treatment of them. Some + reject unpaired surrogates, some discard them, and some retain them. ## JSON can multiply nicely, but it can't add very well