--- source: crates/biome_json_parser/tests/spec_test.rs expression: snapshot --- ## Input ```json {"x", null} ``` ## AST ``` JsonRoot { bom_token: missing (optional), value: JsonObjectValue { l_curly_token: L_CURLY@0..1 "{" [] [], json_member_list: JsonMemberList [ JsonMember { name: JsonMemberName { value_token: JSON_STRING_LITERAL@1..4 "\"x\"" [] [], }, colon_token: missing (required), value: missing (required), }, COMMA@4..6 "," [] [Whitespace(" ")], JsonMember { name: missing (required), colon_token: missing (required), value: JsonNullValue { value_token: NULL_KW@6..10 "null" [] [], }, }, ], r_curly_token: R_CURLY@10..11 "}" [] [], }, eof_token: EOF@11..11 "" [] [], } ``` ## CST ``` 0: JSON_ROOT@0..11 0: (empty) 1: JSON_OBJECT_VALUE@0..11 0: L_CURLY@0..1 "{" [] [] 1: JSON_MEMBER_LIST@1..10 0: JSON_MEMBER@1..4 0: JSON_MEMBER_NAME@1..4 0: JSON_STRING_LITERAL@1..4 "\"x\"" [] [] 1: (empty) 2: (empty) 1: COMMA@4..6 "," [] [Whitespace(" ")] 2: JSON_MEMBER@6..10 0: (empty) 1: (empty) 2: JSON_NULL_VALUE@6..10 0: NULL_KW@6..10 "null" [] [] 2: R_CURLY@10..11 "}" [] [] 2: EOF@11..11 "" [] [] ``` ## Diagnostics ``` object_comma_instead_of_colon.json:1:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `:` but instead found `,` > 1 │ {"x", null} │ ^ i Remove , object_comma_instead_of_colon.json:1:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected a property but instead found 'null'. > 1 │ {"x", null} │ ^^^^ i Expected a property here. > 1 │ {"x", null} │ ^^^^ ```