--- source: crates/rome_json_parser/tests/spec_test.rs expression: snapshot --- ## Input ```json ["\x00"] ``` ## AST ``` JsonRoot { value: JsonArrayValue { l_brack_token: L_BRACK@0..1 "[" [] [], elements: JsonArrayElementList [ JsonBogusValue { items: [ ERROR_TOKEN@1..7 "\"\\x00\"" [] [], ], }, ], r_brack_token: R_BRACK@7..8 "]" [] [], }, eof_token: EOF@8..8 "" [] [], } ``` ## CST ``` 0: JSON_ROOT@0..8 0: JSON_ARRAY_VALUE@0..8 0: L_BRACK@0..1 "[" [] [] 1: JSON_ARRAY_ELEMENT_LIST@1..7 0: JSON_BOGUS_VALUE@1..7 0: ERROR_TOKEN@1..7 "\"\\x00\"" [] [] 2: R_BRACK@7..8 "]" [] [] 1: EOF@8..8 "" [] [] ``` ## Diagnostics ``` string_escape_x.json:1:2 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected an array, an object, or a literal but instead found '"\x00"' > 1 │ ["\x00"] │ ^^^^^^ i Expected an array, an object, or a literal here > 1 │ ["\x00"] │ ^^^^^^ string_escape_x.json:1:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Invalid escape sequence > 1 │ ["\x00"] │ ^^ i Valid escape sequences are: `\\`, `\/`, `/"`, `\b\`, `\f`, `\n`, `\r`, `\t` or any unicode escape sequence `\uXXXX` where X is hexedecimal number. ```