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