We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58f4864 commit 94ee9a8Copy full SHA for 94ee9a8
grammars/json_arr.gbnf
@@ -1,6 +1,15 @@
1
+# This is the same as json.gbnf but we restrict whitespaces at the end of the root array
2
+# Useful for generating JSON arrays
3
+
4
root ::= arr
5
value ::= object | array | string | number | ("true" | "false" | "null") ws
6
7
+arr ::=
8
+ "{\n\t[\n" ws (
9
+ value
10
+ (",\n" ws value)*
11
+ )? "\t]\n}"
12
13
object ::=
14
"{" ws (
15
string ":" ws value
@@ -13,12 +22,6 @@ array ::=
22
("," ws value)*
23
)? "]" ws
24
16
-arr ::=
17
- "[\n" ws (
18
- value
19
- (",\n" ws value)*
20
- )? "]"
21
-
25
string ::=
26
"\"" (
27
[^"\\] |
0 commit comments