Skip to content

Commit

Permalink
Changed json.c comments to clarify the JSON character set
Browse files Browse the repository at this point in the history
  • Loading branch information
lcn2 committed Apr 19, 2022
1 parent 92df127 commit 3477f4e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions json.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,14 @@ static void expand_json_code_ignore_set(void);
*
* old new
* ----------------------------
* \x00-\x07 \u0000 - \u0007
* <backspace> \b (\x08)
* <horizontal_tab> \t (\x09)
* <newline> \n (\x0a)
* \x0b \u000b <vertical_tab>
* <form_feed> \f (\x0c)
* <enter> \r (\x0d)
* \x0e-\x1f \u000e - \x001f
* " \" (\x22)
* / \/ (\x2f)
* \ \\ (\x5c)
Expand All @@ -377,15 +380,15 @@ static void expand_json_code_ignore_set(void);
* < \u003c (\x3c)
* > \u003e (\x3e)
*
* These escape characters are implied by JSON to let humans
* view JSON without worrying about characters that might
* not display / might not be printable:
* The JSON spec:
*
* https://www.json.org/json-en.html
*
* is UTF-8 character based, but for now, we encoded non-ASCII
* bytes as followed:
*
* old new
* ----------------------------
* \x00-\x07 \u0000 - \u0007
* \x0b \u000b <vertical_tab>
* \x0e-\x1f \u000e - \x001f
* \x7f-\xff \u007f - \u00ff
*
* See:
Expand Down

0 comments on commit 3477f4e

Please sign in to comment.