--- source: crates/biome_json_parser/tests/spec_test.rs expression: snapshot --- ## Input ```json ["x",,] ``` ## AST ``` JsonRoot { bom_token: missing (optional), value: JsonArrayValue { l_brack_token: L_BRACK@0..1 "[" [] [], elements: JsonArrayElementList [ JsonStringValue { value_token: JSON_STRING_LITERAL@1..4 "\"x\"" [] [], }, COMMA@4..5 "," [] [], missing element, COMMA@5..6 "," [] [], ], r_brack_token: R_BRACK@6..7 "]" [] [], }, eof_token: EOF@7..7 "" [] [], } ``` ## CST ``` 0: JSON_ROOT@0..7 0: (empty) 1: JSON_ARRAY_VALUE@0..7 0: L_BRACK@0..1 "[" [] [] 1: JSON_ARRAY_ELEMENT_LIST@1..6 0: JSON_STRING_VALUE@1..4 0: JSON_STRING_LITERAL@1..4 "\"x\"" [] [] 1: COMMA@4..5 "," [] [] 2: (empty) 3: COMMA@5..6 "," [] [] 2: R_BRACK@6..7 "]" [] [] 2: EOF@7..7 "" [] [] ``` ## Diagnostics ``` array_double_extra_comma.json:1:6 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an array, an object, or a literal but instead found ','. > 1 │ ["x",,] │ ^ i Expected an array, an object, or a literal here. > 1 │ ["x",,] │ ^ array_double_extra_comma.json:1:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an array, an object, or a literal but instead found ']'. > 1 │ ["x",,] │ ^ i Expected an array, an object, or a literal here. > 1 │ ["x",,] │ ^ ```