implement the JSON parser from https://github.com/gebner/lean4/tree/server by @gebner using new Lean 4 syntax and fix some minor bugs.
17 lines
450 B
Text
17 lines
450 B
Text
"null"
|
|
"false"
|
|
"true"
|
|
"0.0000123456"
|
|
"1000000"
|
|
"\"\""
|
|
"\"abc\""
|
|
"[true, 123, \"foo\", []]"
|
|
"{\"e\": [{}], \"d\": {\"foo\": \"bar\"}, \"c\": null, \"b\": \"foo\", \"a\": 1.2}"
|
|
"offset 7: unexpected character in array"
|
|
"offset 1: unexpected end of input"
|
|
"offset 0: unexpected input"
|
|
"offset 1: unexpected end of input"
|
|
"offset 1: unexpected end of input"
|
|
"offset 2: unexpected end of input"
|
|
"offset 1: expected \""
|
|
"offset 3: unexpected end of input"
|