-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-System.Text.Jsonjson-functionality-docMissing JSON specific functionality that needs documentingMissing JSON specific functionality that needs documenting
Milestone
Description
The RFC8259 define as follow the character escaping:
https://tools.ietf.org/html/rfc8259#section-7
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).
unescaped = %x20-21 / %x23-5B / %x5D-10FFFF
Meaning that the escaped characters MUST be %x00-19 / %x22 / %x5C
Currently, the Utf8JsonWriter
is escaping too much:
unescaped = %x00-19 / %x22 / %x26 / %x27 %x2B / %x3C / %x3E / %x5C / %x61 / %x7F / %x80-FF
If the reason is for security, you may propose as a JsonWriterOptions
a strict character table, and a safer character table.
Related to #28567
@ahsonkhan
nil4, ccnxpt, AmrAlSayed0, alicint and petrsvihlik
Metadata
Metadata
Assignees
Labels
area-System.Text.Jsonjson-functionality-docMissing JSON specific functionality that needs documentingMissing JSON specific functionality that needs documenting