jansson/test/testdata/invalid

180 lines
2.6 KiB
Plaintext
Raw Normal View History

==== empty ====
2009-07-10 02:01:40 +08:00
====
1
'[' or '{' expected near end of file
==== null ====
2009-07-10 02:01:40 +08:00
null
====
1
'[' or '{' expected near 'null'
==== lone-open-brace ====
2009-07-10 02:01:40 +08:00
{
====
2
string or '}' expected near end of file
==== lone-open-bracket ====
2009-07-10 02:01:40 +08:00
[
====
2
']' expected near end of file
==== bracket-comma ====
2009-07-10 02:01:40 +08:00
[,
====
1
unexpected token near ','
==== bracket-one-comma ====
2009-07-10 02:01:40 +08:00
[1,
====
2
']' expected near end of file
==== unterminated-string ====
2009-07-10 02:01:40 +08:00
["a
====
1
unexpected newline near '"a'
==== unterminated-array ====
2009-07-10 02:01:40 +08:00
["a"
====
2
']' expected near end of file
==== apostrophe ====
2009-07-10 02:01:40 +08:00
['
====
1
invalid token near '''
==== brace-comma ====
2009-07-10 02:01:40 +08:00
{,
====
1
string or '}' expected near ','
==== unterminated-empty-key ====
2009-07-10 02:01:40 +08:00
{"
====
1
unexpected newline near '"'
==== unterminated-key ====
2009-07-10 02:01:40 +08:00
{"a
====
1
unexpected newline near '"a'
==== object-no-colon ====
2009-07-10 02:01:40 +08:00
{"a"
====
2
':' expected near end of file
==== object-apostrophes ====
2009-07-10 02:01:40 +08:00
{'a'
====
1
string or '}' expected near '''
==== object-no-value ====
2009-07-10 02:01:40 +08:00
{"a":
====
2
unexpected token near end of file
==== object-unterminated-value ====
2009-07-10 02:01:40 +08:00
{"a":"a
====
1
unexpected newline near '"a'
==== object-garbage-at-end ====
{"a":"a" 123}
====
1
'}' expected near '123'
==== unterminated-object-and-array ====
2009-07-10 02:01:40 +08:00
{[
====
1
string or '}' expected near '['
==== unterminated-array-and-object ====
2009-07-10 02:01:40 +08:00
[{
====
2
string or '}' expected near end of file
==== object-in-unterminated-array ====
2009-07-10 02:01:40 +08:00
[{}
====
2
']' expected near end of file
==== extra-comma-in-array ====
2009-07-10 02:01:40 +08:00
[1,]
====
1
unexpected token near ']'
==== extra-command-in-multiline-array ====
2009-07-10 02:01:40 +08:00
[1,
2,
3,
4,
5,
]
====
6
unexpected token near ']'
==== real-truncated-at-point ====
2009-07-10 02:01:40 +08:00
[1.]
====
1
invalid token near '1.'
==== real-truncated-at-e ====
2009-07-10 02:01:40 +08:00
[1e]
====
1
invalid token near '1e'
==== real-garbage-after-e ====
2009-07-10 02:01:40 +08:00
[1ea]
====
1
invalid token near '1e'
==== integer-starting-with-zero ====
2009-07-10 02:01:40 +08:00
[012]
====
1
invalid token near '0'
==== negative-integer-starting-with-zero ====
2009-07-10 02:01:40 +08:00
[-012]
====
1
invalid token near '-0'
==== invalid-identifier ====
[troo
====
1
invalid token near 'troo'
==== invalid-escap ====
["\a <-- invalid escape"]
====
1
invalid escape near '"\'
==== tab-character-in-string ====
2009-07-10 02:01:40 +08:00
[" <-- tab character"]
====
1
control character 0x9 near '"'
==== null-byte-in-string ====
2009-07-15 01:47:57 +08:00
["\u0000 (null byte not allowed)"]
====
1
\u0000 is not allowed
==== truncated-unicode-surrogate ====
2009-07-15 01:47:57 +08:00
["\uDADA (first surrogate without the second)"]
====
1
invalid Unicode '\uDADA'
==== invalid-second-surrogate ====
2009-07-15 01:47:57 +08:00
["\uD888\u3210 (first surrogate and invalid second surrogate)"]
====
1
invalid Unicode '\uD888\u3210'
==== lone-second-surrogate ====
2009-07-15 01:47:57 +08:00
["\uDFAA (second surrogate on it's own)"]
====
1
invalid Unicode '\uDFAA'
==== unicode-identifier ====
å
====
1
'[' or '{' expected near 'å'