Add json QUIRK_JSON_POINTER_ALLOW_TILDE_R_TILDE_N

This commit is contained in:
Nigel Tao committed 2020-08-13 00:06:56 +10:00
1 parent 16fadb25cf
commit b3438434ca
5 files changed
+92 -39

No files matched your search

+9 -2
View File
@@ -197,6 +197,13 @@ pub const QUIRK_ALLOW_LEADING_UNICODE_BYTE_ORDER_MARK : base.u32 = 0x4909_9400 |
// line comment.
pub const QUIRK_ALLOW_TRAILING_NEW_LINE : base.u32 = 0x4909_9400 | 0x11
// When this quirk is enabled, JSON Pointer strings containing "~r" or "~n",
// which would otherwise be invalid, are unescaped as "\r" or "\n".
//
// This quirk isn't used by Wuffs' std/json package per se, but it is used by
// the wuffs_aux::DecodeJson function.
pub const QUIRK_JSON_POINTER_ALLOW_TILDE_R_TILDE_N : base.u32 = 0x4909_9400 | 0x12
// When this quirk is enabled, invalid UTF-8 inside a JSON string is accepted.
// Each byte of invalid UTF-8 is equivalent to "\uFFFD", the Unicode
// Replacement Character. The UTF-8 encoding of U+FFFD is "\xEF\xBF\xBD".
@@ -211,6 +218,6 @@ pub const QUIRK_ALLOW_TRAILING_NEW_LINE : base.u32 = 0x4909_9400 | 0x11
// When combined with QUIRK_ALLOW_BACKSLASH_CAPITAL_U, a "\U12345678" 10-byte
// unit that is an invalid Unicode code point (i.e. in the range U+D800 ..=
// U+DFFF or above U+10FFFF) is similarly replaced with U+FFFD.
pub const QUIRK_REPLACE_INVALID_UNICODE : base.u32 = 0x4909_9400 | 0x12
pub const QUIRK_REPLACE_INVALID_UNICODE : base.u32 = 0x4909_9400 | 0x13
pri const QUIRKS_COUNT : base.u32 = 0x13
pri const QUIRKS_COUNT : base.u32 = 0x14