--- source: crates/biome_json_parser/tests/spec_test.rs expression: snapshot --- ## Input ```json ["\uD834\uDd"] ``` ## AST ``` JsonRoot { bom_token: missing (optional), value: JsonArrayValue { l_brack_token: L_BRACK@0..1 "[" [] [], elements: JsonArrayElementList [ JsonBogusValue { items: [ ERROR_TOKEN@1..13 "\"\\uD834\\uDd\"" [] [], ], }, ], r_brack_token: R_BRACK@13..14 "]" [] [], }, eof_token: EOF@14..14 "" [] [], } ``` ## CST ``` 0: JSON_ROOT@0..14 0: (empty) 1: JSON_ARRAY_VALUE@0..14 0: L_BRACK@0..1 "[" [] [] 1: JSON_ARRAY_ELEMENT_LIST@1..13 0: JSON_BOGUS_VALUE@1..13 0: ERROR_TOKEN@1..13 "\"\\uD834\\uDd\"" [] [] 2: R_BRACK@13..14 "]" [] [] 2: EOF@14..14 "" [] [] ``` ## Diagnostics ``` string_incomplete_surrogate.json:1:2 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an array, an object, or a literal but instead found '"\uD834\uDd"'. > 1 │ ["\uD834\uDd"] │ ^^^^^^^^^^^^ i Expected an array, an object, or a literal here. > 1 │ ["\uD834\uDd"] │ ^^^^^^^^^^^^ string_incomplete_surrogate.json:1:9 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Invalid unicode sequence > 1 │ ["\uD834\uDd"] │ ^^^^ i Non hexadecimal number > 1 │ ["\uD834\uDd"] │ ^ i A unicode escape sequence must consist of 4 hexadecimal numbers: `\uXXXX`, e.g. `\u002F' for '/'. ```