Created
March 7, 2022 15:46
-
-
Save dmj/63e7707f0cac5645ef98d9bf506c8508 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@literalws = right | |
json = ~ value ~ | |
value = string | number | object | array | "true" | "false" | "null" | |
string = `"` { anyUnicodeCharacterExceptQuoteOrBackslashOrControlCharacter | `\"` | `\\` | `\/` | `\b` | `\f` | `\n` | `\r` | `\t` | `\u` fourHexadecimalDigits } `"` | |
anyUnicodeCharacterExceptQuoteOrBackslashOrControlCharacter = ! /["\\]/ alphabet | |
alphabet = /[\u0009\u000A\u000D\u0020-\uD7FF#\uE000-\uFFFD\u10000-\u10FFFF]/ | |
fourHexadecimalDigits = /[0-9A-Fa-f]{4}/ | |
digit = /[0-9]/ | |
digitOneThroughNine = /[1-9]/ | |
number = [ "-" ] ( "0" | digitOneThroughNine { digit } ) [ "." { digit }+ ] [ ( "e" | "E" ) [ "+" | "-" ] { digit }+ ] | |
object = "{" [ pair { "," pair } ] "}" | |
pair = string ":" value ~ | |
array = "[" [ value { "," value } ] "]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment