--- source: crates/rome_json_parser/tests/spec_test.rs expression: snapshot --- ## Input ```json {"a": true} "x" ``` ## AST ``` JsonRoot { value: JsonArrayValue { l_brack_token: missing (required), elements: JsonArrayElementList [ JsonObjectValue { l_curly_token: L_CURLY@0..1 "{" [] [], json_member_list: JsonMemberList [ JsonMember { name: JsonMemberName { value_token: JSON_STRING_LITERAL@1..4 "\"a\"" [] [], }, colon_token: COLON@4..6 ":" [] [Whitespace(" ")], value: JsonBooleanValue { value_token: TRUE_KW@6..10 "true" [] [], }, }, ], r_curly_token: R_CURLY@10..12 "}" [] [Whitespace(" ")], }, missing separator, JsonStringValue { value_token: JSON_STRING_LITERAL@12..15 "\"x\"" [] [], }, ], r_brack_token: missing (required), }, eof_token: EOF@15..15 "" [] [], } ``` ## CST ``` 0: JSON_ROOT@0..15 0: JSON_ARRAY_VALUE@0..15 0: (empty) 1: JSON_ARRAY_ELEMENT_LIST@0..15 0: JSON_OBJECT_VALUE@0..12 0: L_CURLY@0..1 "{" [] [] 1: JSON_MEMBER_LIST@1..10 0: JSON_MEMBER@1..10 0: JSON_MEMBER_NAME@1..4 0: JSON_STRING_LITERAL@1..4 "\"a\"" [] [] 1: COLON@4..6 ":" [] [Whitespace(" ")] 2: JSON_BOOLEAN_VALUE@6..10 0: TRUE_KW@6..10 "true" [] [] 2: R_CURLY@10..12 "}" [] [Whitespace(" ")] 1: (empty) 2: JSON_STRING_VALUE@12..15 0: JSON_STRING_LITERAL@12..15 "\"x\"" [] [] 2: (empty) 1: EOF@15..15 "" [] [] ``` ## Diagnostics ``` structure_object_with_trailing_garbage.json:1:13 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × End of file expected > 1 │ {"a": true} "x" │ ^^^ i Use an array for a sequence of values: `[1, 2]` ```