54 lines
867 B
Text
54 lines
867 B
Text
==========================================
|
|
top-level errors
|
|
==========================================
|
|
|
|
[}
|
|
|
|
---
|
|
|
|
(ERROR '}')
|
|
|
|
==========================================
|
|
unexpected tokens
|
|
==========================================
|
|
|
|
barf
|
|
|
|
---
|
|
|
|
(ERROR 'b')
|
|
|
|
==========================================
|
|
errors inside arrays
|
|
==========================================
|
|
|
|
[1, , 2]
|
|
|
|
---
|
|
(array
|
|
(number)
|
|
(ERROR ',')
|
|
(number))
|
|
|
|
==========================================
|
|
errors inside objects
|
|
==========================================
|
|
|
|
{ "key1": 1, oops }
|
|
|
|
---
|
|
|
|
(object (string) (number) (ERROR 'o'))
|
|
|
|
==========================================
|
|
errors inside nested objects
|
|
==========================================
|
|
|
|
{ "key1": { "key2": 1, 2 }, [, "key3": 3 }
|
|
|
|
---
|
|
|
|
(object
|
|
(string) (object (string) (number) (ERROR '2'))
|
|
(ERROR '[')
|
|
(string) (number))
|