RFC 8259 says:

   However, the ABNF in this specification allows member names and
   string values to contain bit sequences that cannot encode Unicode
   characters; for example, "\uDEAD" (a single unpaired UTF-16
   surrogate).  Instances of this have been observed, for example, when
   a library truncates a UTF-16 string without checking whether the
   truncation split a surrogate pair.  The behavior of software that
   receives JSON texts containing such values is unpredictable; for
   example, implementations might return different values for the length
   of a string value or even suffer fatal runtime exceptions.

I think therefore that the Right Thing to do with an unpaired surrogate, since it is not possible to represent it as as a Scheme character, is to raise an exception.   Alternatively, there could be an argument whose value is either the symbol `raise` or the symbol `replace`.  In the latter case, an unpaired surrogate could be converted to #\uFFFD.

ECMA-404, the other JSON standard, is silent on this point.



John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
Well, I have news for our current leaders and the leaders of tomorrow:
the Bill of Rights is not a frivolous luxury, in force only during
times of peace and prosperity.  We don't just push it to the side
when the going gets tough.  --Molly Ivins