--- source: crates/rome_json_parser/tests/spec_test.rs expression: snapshot --- ## Input ```json {"id":0,,,,,} ``` ## AST ``` JsonRoot { value: JsonObjectValue { l_curly_token: L_CURLY@0..1 "{" [] [], json_member_list: JsonMemberList [ JsonMember { name: JsonMemberName { value_token: JSON_STRING_LITERAL@1..5 "\"id\"" [] [], }, colon_token: COLON@5..6 ":" [] [], value: JsonNumberValue { value_token: JSON_NUMBER_LITERAL@6..7 "0" [] [], }, }, COMMA@7..8 "," [] [], missing element, COMMA@8..9 "," [] [], missing element, COMMA@9..10 "," [] [], missing element, COMMA@10..11 "," [] [], missing element, COMMA@11..12 "," [] [], missing element, ], r_curly_token: R_CURLY@12..13 "}" [] [], }, eof_token: EOF@13..13 "" [] [], } ``` ## CST ``` 0: JSON_ROOT@0..13 0: JSON_OBJECT_VALUE@0..13 0: L_CURLY@0..1 "{" [] [] 1: JSON_MEMBER_LIST@1..12 0: JSON_MEMBER@1..7 0: JSON_MEMBER_NAME@1..5 0: JSON_STRING_LITERAL@1..5 "\"id\"" [] [] 1: COLON@5..6 ":" [] [] 2: JSON_NUMBER_VALUE@6..7 0: JSON_NUMBER_LITERAL@6..7 "0" [] [] 1: COMMA@7..8 "," [] [] 2: (empty) 3: COMMA@8..9 "," [] [] 4: (empty) 5: COMMA@9..10 "," [] [] 6: (empty) 7: COMMA@10..11 "," [] [] 8: (empty) 9: COMMA@11..12 "," [] [] 10: (empty) 2: R_CURLY@12..13 "}" [] [] 1: EOF@13..13 "" [] [] ``` ## Diagnostics ``` object_several_trailing_commas.json:1:9 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected a property but instead found ',' > 1 │ {"id":0,,,,,} │ ^ i Expected a property here > 1 │ {"id":0,,,,,} │ ^ object_several_trailing_commas.json:1:10 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected a property but instead found ',' > 1 │ {"id":0,,,,,} │ ^ i Expected a property here > 1 │ {"id":0,,,,,} │ ^ object_several_trailing_commas.json:1:11 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected a property but instead found ',' > 1 │ {"id":0,,,,,} │ ^ i Expected a property here > 1 │ {"id":0,,,,,} │ ^ object_several_trailing_commas.json:1:12 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected a property but instead found ',' > 1 │ {"id":0,,,,,} │ ^ i Expected a property here > 1 │ {"id":0,,,,,} │ ^ object_several_trailing_commas.json:1:13 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected a property but instead found '}' > 1 │ {"id":0,,,,,} │ ^ i Expected a property here > 1 │ {"id":0,,,,,} │ ^ ```