2 // Grammar for JSON, as defined at json.org.
6 object -> "{" (string ":" value) *(,) "}";
7 array -> "[" value *(,) "]";
9 str_frag -> .chars=/[^\\"]+/ |
10 .unicode_char=/\\u ([0-9A-Fa-f]{4})/ |
11 .backslash_char=/\\[ntbr"\/\\]/;
12 string -> '"' str_frag* '"';
20 value -> string | number | "true" | "false" | "null" | object | array;
22 whitespace: /[\r\n\s\t]+/;