--- source: crates/biome_json_parser/tests/spec_test.rs expression: snapshot --- ## Input ```json { "a": [ "a", ], "b": { "c": true, }, "d": [ null, ], "e": { "f": {}, }, "g": 0, } ``` ## 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..9 "\"a\"" [Newline("\n"), Whitespace(" ")] [], }, colon_token: COLON@9..11 ":" [] [Whitespace(" ")], value: JsonArrayValue { l_brack_token: L_BRACK@11..12 "[" [] [], elements: JsonArrayElementList [ JsonStringValue { value_token: JSON_STRING_LITERAL@12..24 "\"a\"" [Newline("\n"), Whitespace(" ")] [], }, COMMA@24..25 "," [] [], ], r_brack_token: R_BRACK@25..31 "]" [Newline("\n"), Whitespace(" ")] [], }, }, COMMA@31..32 "," [] [], JsonMember { name: JsonMemberName { value_token: JSON_STRING_LITERAL@32..40 "\"b\"" [Newline("\n"), Whitespace(" ")] [], }, colon_token: COLON@40..42 ":" [] [Whitespace(" ")], value: JsonObjectValue { l_curly_token: L_CURLY@42..43 "{" [] [], json_member_list: JsonMemberList [ JsonMember { name: JsonMemberName { value_token: JSON_STRING_LITERAL@43..55 "\"c\"" [Newline("\n"), Whitespace(" ")] [], }, colon_token: COLON@55..57 ":" [] [Whitespace(" ")], value: JsonBooleanValue { value_token: TRUE_KW@57..61 "true" [] [], }, }, COMMA@61..62 "," [] [], ], r_curly_token: R_CURLY@62..68 "}" [Newline("\n"), Whitespace(" ")] [], }, }, COMMA@68..69 "," [] [], JsonMember { name: JsonMemberName { value_token: JSON_STRING_LITERAL@69..77 "\"d\"" [Newline("\n"), Whitespace(" ")] [], }, colon_token: COLON@77..79 ":" [] [Whitespace(" ")], value: JsonArrayValue { l_brack_token: L_BRACK@79..80 "[" [] [], elements: JsonArrayElementList [ JsonNullValue { value_token: NULL_KW@80..93 "null" [Newline("\n"), Whitespace(" ")] [], }, COMMA@93..94 "," [] [], ], r_brack_token: R_BRACK@94..100 "]" [Newline("\n"), Whitespace(" ")] [], }, }, COMMA@100..101 "," [] [], JsonMember { name: JsonMemberName { value_token: JSON_STRING_LITERAL@101..109 "\"e\"" [Newline("\n"), Whitespace(" ")] [], }, colon_token: COLON@109..111 ":" [] [Whitespace(" ")], value: JsonObjectValue { l_curly_token: L_CURLY@111..112 "{" [] [], json_member_list: JsonMemberList [ JsonMember { name: JsonMemberName { value_token: JSON_STRING_LITERAL@112..124 "\"f\"" [Newline("\n"), Whitespace(" ")] [], }, colon_token: COLON@124..126 ":" [] [Whitespace(" ")], value: JsonObjectValue { l_curly_token: L_CURLY@126..127 "{" [] [], json_member_list: JsonMemberList [], r_curly_token: R_CURLY@127..128 "}" [] [], }, }, COMMA@128..129 "," [] [], ], r_curly_token: R_CURLY@129..135 "}" [Newline("\n"), Whitespace(" ")] [], }, }, COMMA@135..136 "," [] [], JsonMember { name: JsonMemberName { value_token: JSON_STRING_LITERAL@136..144 "\"g\"" [Newline("\n"), Whitespace(" ")] [], }, colon_token: COLON@144..146 ":" [] [Whitespace(" ")], value: JsonNumberValue { value_token: JSON_NUMBER_LITERAL@146..147 "0" [] [], }, }, COMMA@147..148 "," [] [], ], r_curly_token: R_CURLY@148..150 "}" [Newline("\n")] [], }, eof_token: EOF@150..151 "" [Newline("\n")] [], } ``` ## CST ``` 0: JSON_ROOT@0..151 0: (empty) 1: JSON_OBJECT_VALUE@0..150 0: L_CURLY@0..1 "{" [] [] 1: JSON_MEMBER_LIST@1..148 0: JSON_MEMBER@1..31 0: JSON_MEMBER_NAME@1..9 0: JSON_STRING_LITERAL@1..9 "\"a\"" [Newline("\n"), Whitespace(" ")] [] 1: COLON@9..11 ":" [] [Whitespace(" ")] 2: JSON_ARRAY_VALUE@11..31 0: L_BRACK@11..12 "[" [] [] 1: JSON_ARRAY_ELEMENT_LIST@12..25 0: JSON_STRING_VALUE@12..24 0: JSON_STRING_LITERAL@12..24 "\"a\"" [Newline("\n"), Whitespace(" ")] [] 1: COMMA@24..25 "," [] [] 2: R_BRACK@25..31 "]" [Newline("\n"), Whitespace(" ")] [] 1: COMMA@31..32 "," [] [] 2: JSON_MEMBER@32..68 0: JSON_MEMBER_NAME@32..40 0: JSON_STRING_LITERAL@32..40 "\"b\"" [Newline("\n"), Whitespace(" ")] [] 1: COLON@40..42 ":" [] [Whitespace(" ")] 2: JSON_OBJECT_VALUE@42..68 0: L_CURLY@42..43 "{" [] [] 1: JSON_MEMBER_LIST@43..62 0: JSON_MEMBER@43..61 0: JSON_MEMBER_NAME@43..55 0: JSON_STRING_LITERAL@43..55 "\"c\"" [Newline("\n"), Whitespace(" ")] [] 1: COLON@55..57 ":" [] [Whitespace(" ")] 2: JSON_BOOLEAN_VALUE@57..61 0: TRUE_KW@57..61 "true" [] [] 1: COMMA@61..62 "," [] [] 2: R_CURLY@62..68 "}" [Newline("\n"), Whitespace(" ")] [] 3: COMMA@68..69 "," [] [] 4: JSON_MEMBER@69..100 0: JSON_MEMBER_NAME@69..77 0: JSON_STRING_LITERAL@69..77 "\"d\"" [Newline("\n"), Whitespace(" ")] [] 1: COLON@77..79 ":" [] [Whitespace(" ")] 2: JSON_ARRAY_VALUE@79..100 0: L_BRACK@79..80 "[" [] [] 1: JSON_ARRAY_ELEMENT_LIST@80..94 0: JSON_NULL_VALUE@80..93 0: NULL_KW@80..93 "null" [Newline("\n"), Whitespace(" ")] [] 1: COMMA@93..94 "," [] [] 2: R_BRACK@94..100 "]" [Newline("\n"), Whitespace(" ")] [] 5: COMMA@100..101 "," [] [] 6: JSON_MEMBER@101..135 0: JSON_MEMBER_NAME@101..109 0: JSON_STRING_LITERAL@101..109 "\"e\"" [Newline("\n"), Whitespace(" ")] [] 1: COLON@109..111 ":" [] [Whitespace(" ")] 2: JSON_OBJECT_VALUE@111..135 0: L_CURLY@111..112 "{" [] [] 1: JSON_MEMBER_LIST@112..129 0: JSON_MEMBER@112..128 0: JSON_MEMBER_NAME@112..124 0: JSON_STRING_LITERAL@112..124 "\"f\"" [Newline("\n"), Whitespace(" ")] [] 1: COLON@124..126 ":" [] [Whitespace(" ")] 2: JSON_OBJECT_VALUE@126..128 0: L_CURLY@126..127 "{" [] [] 1: JSON_MEMBER_LIST@127..127 2: R_CURLY@127..128 "}" [] [] 1: COMMA@128..129 "," [] [] 2: R_CURLY@129..135 "}" [Newline("\n"), Whitespace(" ")] [] 7: COMMA@135..136 "," [] [] 8: JSON_MEMBER@136..147 0: JSON_MEMBER_NAME@136..144 0: JSON_STRING_LITERAL@136..144 "\"g\"" [Newline("\n"), Whitespace(" ")] [] 1: COLON@144..146 ":" [] [Whitespace(" ")] 2: JSON_NUMBER_VALUE@146..147 0: JSON_NUMBER_LITERAL@146..147 "0" [] [] 9: COMMA@147..148 "," [] [] 2: R_CURLY@148..150 "}" [Newline("\n")] [] 2: EOF@150..151 "" [Newline("\n")] [] ```