When encoding some invalid user generated data, we encounter JsonGenerationExceptions with the message Unmatched first part of surrogate pair. This didn't occur when using text serialization.
It seems there's a CBOR option to avoid this exception, CBORGenerator.Feature.LENIENT_UTF_ENCODING, but not one for Smile. It would be great to add this feature.
To reproduce, just try to serialize an invalid string, such as "\uD83D".
When encoding some invalid user generated data, we encounter
JsonGenerationException
s with the messageUnmatched first part of surrogate pair
. This didn't occur when using text serialization.It seems there's a CBOR option to avoid this exception,
CBORGenerator.Feature.LENIENT_UTF_ENCODING
, but not one for Smile. It would be great to add this feature.To reproduce, just try to serialize an invalid string, such as
"\uD83D"
.