As per RFC 4627, section 2.5, control characters must be escaped when encoding strings in JSON documents:
All Unicode characters may be placed within the
quotation marks except for the characters that must be escaped:
quotation mark, reverse solidus, and the control characters (U+0000
through U+001F).
Serializer::SerializerPrivate::sanitizeString escapes all characters >= 128, backslashes, quotes, tabs and new lines but not control characters.
As per RFC 4627, section 2.5, control characters must be escaped when encoding strings in JSON documents:
Serializer::SerializerPrivate::sanitizeString
escapes all characters >= 128, backslashes, quotes, tabs and new lines but not control characters.