Implement JSON_ENSURE_ASCII encoding flag
[jansson.git] / test / testdata / invalid
1 ==== empty ====
2 ====
3 1
4 '[' or '{' expected near end of file
5 ==== null ====
6 null
7 ====
8 1
9 '[' or '{' expected near 'null'
10 ==== lone-open-brace ====
11 {
12 ====
13 2
14 string or '}' expected near end of file
15 ==== lone-open-bracket ====
16 [
17 ====
18 2
19 ']' expected near end of file
20 ==== bracket-comma ====
21 [,
22 ====
23 1
24 unexpected token near ','
25 ==== bracket-one-comma ====
26 [1,
27 ====
28 2
29 ']' expected near end of file
30 ==== unterminated-string ====
31 ["a
32 ====
33 1
34 unexpected newline near '"a'
35 ==== unterminated-array ====
36 ["a"
37 ====
38 2
39 ']' expected near end of file
40 ==== apostrophe ====
41 ['
42 ====
43 1
44 invalid token near '''
45 ==== brace-comma ====
46 {,
47 ====
48 1
49 string or '}' expected near ','
50 ==== unterminated-empty-key ====
51 {"
52 ====
53 1
54 unexpected newline near '"'
55 ==== unterminated-key ====
56 {"a
57 ====
58 1
59 unexpected newline near '"a'
60 ==== object-no-colon ====
61 {"a"
62 ====
63 2
64 ':' expected near end of file
65 ==== object-apostrophes ====
66 {'a'
67 ====
68 1
69 string or '}' expected near '''
70 ==== object-no-value ====
71 {"a":
72 ====
73 2
74 unexpected token near end of file
75 ==== object-unterminated-value ====
76 {"a":"a
77 ====
78 1
79 unexpected newline near '"a'
80 ==== object-garbage-at-end ====
81 {"a":"a" 123}
82 ====
83 1
84 '}' expected near '123'
85 ==== unterminated-object-and-array ====
86 {[
87 ====
88 1
89 string or '}' expected near '['
90 ==== unterminated-array-and-object ====
91 [{
92 ====
93 2
94 string or '}' expected near end of file
95 ==== object-in-unterminated-array ====
96 [{}
97 ====
98 2
99 ']' expected near end of file
100 ==== extra-comma-in-array ====
101 [1,]
102 ====
103 1
104 unexpected token near ']'
105 ==== extra-command-in-multiline-array ====
106 [1,
107 2,
108 3,
109 4,
110 5,
111 ]
112 ====
113 6
114 unexpected token near ']'
115 ==== real-truncated-at-point ====
116 [1.]
117 ====
118 1
119 invalid token near '1.'
120 ==== real-truncated-at-e ====
121 [1e]
122 ====
123 1
124 invalid token near '1e'
125 ==== real-garbage-after-e ====
126 [1ea]
127 ====
128 1
129 invalid token near '1e'
130 ==== real-positive-overflow ====
131 [123123e100000]
132 ====
133 1
134 real number overflow near '123123e100000'
135 ==== real-negative-overflow ====
136 [-123123e100000]
137 ====
138 1
139 real number overflow near '-123123e100000'
140 ==== real-underflow ====
141 [123e-10000000]
142 ====
143 1
144 real number underflow near '123e-10000000'
145 ==== integer-starting-with-zero ====
146 [012]
147 ====
148 1
149 invalid token near '0'
150 ==== negative-integer-starting-with-zero ====
151 [-012]
152 ====
153 1
154 invalid token near '-0'
155 ==== too-big-positive-integer ====
156 [123123123123123]
157 ====
158 1
159 too big integer near '123123123123123'
160 ==== too-big-negative-integer ====
161 [-123123123123123]
162 ====
163 1
164 too big negative integer near '-123123123123123'
165 ==== invalid-identifier ====
166 [troo
167 ====
168 1
169 invalid token near 'troo'
170 ==== minus-sign-without-number ====
171 [-foo]
172 ====
173 1
174 invalid token near '-'
175 ==== invalid-negative-integerr ====
176 [-123foo]
177 ====
178 1
179 ']' expected near 'foo'
180 ==== invalid-negative-real ====
181 [-123.123foo]
182 ====
183 1
184 ']' expected near 'foo'
185 ==== invalid-escape ====
186 ["\a <-- invalid escape"]
187 ====
188 1
189 invalid escape near '"\'
190 ==== tab-character-in-string ====
191 ["       <-- tab character"]
192 ====
193 1
194 control character 0x9 near '"'
195 ==== null-byte-in-string ====
196 ["\u0000 (null byte not allowed)"]
197 ====
198 1
199 \u0000 is not allowed
200 ==== truncated-unicode-surrogate ====
201 ["\uDADA (first surrogate without the second)"]
202 ====
203 1
204 invalid Unicode '\uDADA'
205 ==== invalid-second-surrogate ====
206 ["\uD888\u3210 (first surrogate and invalid second surrogate)"]
207 ====
208 1
209 invalid Unicode '\uD888\u3210'
210 ==== lone-second-surrogate ====
211 ["\uDFAA (second surrogate on it's own)"]
212 ====
213 1
214 invalid Unicode '\uDFAA'
215 ==== unicode-identifier ====
216 å
217 ====
218 1
219 '[' or '{' expected near 'å'
220 ==== ascii-unicode-identifier ====
221
222 ====
223 1
224 '[' or '{' expected near 'a'
225 ==== garbage-at-the-end ====
226 [1,2,3]foo
227 ====
228 1
229 end of file expected near 'foo'
230 ==== garbage-after-newline ====
231 [1,2,3]
232 foo
233 ====
234 2
235 end of file expected near 'foo'