biome_json_parser 0.5.7

Biome's JSON parser
Documentation
---
source: crates/biome_json_parser/tests/spec_test.rs
expression: snapshot
---

## Input

```json
{[: "x"}

```


## AST

```
JsonRoot {
    bom_token: missing (optional),
    value: JsonObjectValue {
        l_curly_token: L_CURLY@0..1 "{" [] [],
        json_member_list: JsonMemberList [
            JsonMember {
                name: missing (required),
                colon_token: missing (required),
                value: JsonArrayValue {
                    l_brack_token: L_BRACK@1..2 "[" [] [],
                    elements: JsonArrayElementList [
                        JsonBogusValue {
                            items: [
                                COLON@2..4 ":" [] [Whitespace(" ")],
                            ],
                        },
                        missing separator,
                        JsonStringValue {
                            value_token: JSON_STRING_LITERAL@4..7 "\"x\"" [] [],
                        },
                    ],
                    r_brack_token: missing (required),
                },
            },
        ],
        r_curly_token: R_CURLY@7..8 "}" [] [],
    },
    eof_token: EOF@8..9 "" [Newline("\n")] [],
}
```

## CST

```
0: JSON_ROOT@0..9
  0: (empty)
  1: JSON_OBJECT_VALUE@0..8
    0: L_CURLY@0..1 "{" [] []
    1: JSON_MEMBER_LIST@1..7
      0: JSON_MEMBER@1..7
        0: (empty)
        1: (empty)
        2: JSON_ARRAY_VALUE@1..7
          0: L_BRACK@1..2 "[" [] []
          1: JSON_ARRAY_ELEMENT_LIST@2..7
            0: JSON_BOGUS_VALUE@2..4
              0: COLON@2..4 ":" [] [Whitespace(" ")]
            1: (empty)
            2: JSON_STRING_VALUE@4..7
              0: JSON_STRING_LITERAL@4..7 "\"x\"" [] []
          2: (empty)
    2: R_CURLY@7..8 "}" [] []
  2: EOF@8..9 "" [Newline("\n")] []

```

## Diagnostics

```
object_bracket_key.json:1:2 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × Expected a property but instead found '['.
  
  > 1 │ {[: "x"}
      │  ^
    2 │ 
  
  i Expected a property here.
  
  > 1 │ {[: "x"}
      │  ^
    2 │ 
  
object_bracket_key.json:1:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × Expected an array, an object, or a literal but instead found ':'.
  
  > 1 │ {[: "x"}
      │   ^
    2 │ 
  
  i Expected an array, an object, or a literal here.
  
  > 1 │ {[: "x"}
      │   ^
    2 │ 
  
object_bracket_key.json:1:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × expected `,` but instead found `"x"`
  
  > 1 │ {[: "x"}
      │     ^^^
    2 │ 
  
  i Remove "x"
  
object_bracket_key.json:1:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × expected `,` but instead found `}`
  
  > 1 │ {[: "x"}
      │        ^
    2 │ 
  
  i Remove }
  
```