2023-08-03 04:05:44 +02:00
|
|
|
root ::= object
|
|
|
|
value ::= object | array | string | number | ("true" | "false" | "null") ws
|
2023-07-24 05:58:10 +02:00
|
|
|
|
|
|
|
object ::=
|
|
|
|
"{" ws (
|
|
|
|
string ":" ws value
|
|
|
|
("," ws string ":" ws value)*
|
2023-08-03 04:05:44 +02:00
|
|
|
)? "}" ws
|
2023-07-24 05:58:10 +02:00
|
|
|
|
|
|
|
array ::=
|
|
|
|
"[" ws (
|
|
|
|
value
|
|
|
|
("," ws value)*
|
2023-08-03 04:05:44 +02:00
|
|
|
)? "]" ws
|
2023-07-24 05:58:10 +02:00
|
|
|
|
2023-08-03 04:05:44 +02:00
|
|
|
string ::=
|
2023-07-24 05:58:10 +02:00
|
|
|
"\"" (
|
2024-03-05 17:33:08 +01:00
|
|
|
[^"\\\x7F\x00-\x1F] |
|
2023-07-24 05:58:10 +02:00
|
|
|
"\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) # escapes
|
|
|
|
)* "\"" ws
|
|
|
|
|
2023-08-03 04:05:44 +02:00
|
|
|
number ::= ("-"? ([0-9] | [1-9] [0-9]*)) ("." [0-9]+)? ([eE] [-+]? [0-9]+)? ws
|
2023-07-24 05:58:10 +02:00
|
|
|
|
|
|
|
# Optional space: by convention, applied in this grammar after literal chars when allowed
|
|
|
|
ws ::= ([ \t\n] ws)?
|