jansson/test/testdata/invalid

196 lines
2.9 KiB
Plaintext

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