2017-11-26 22:31:48 -05:00
new_obj.to_string(" ")="\u0003"
new_obj.to_string(/* hello */"foo")="foo"
new_obj.to_string(// hello
"foo")="foo"
2017-11-26 22:34:43 -05:00
new_obj.to_string("foo"blue)="foo"
2019-12-27 15:07:00 +08:00
new_obj.to_string('foo')="foo"
2017-11-26 22:31:48 -05:00
new_obj.to_string("\u0041\u0042\u0043")="ABC"
2019-12-27 15:07:00 +08:00
new_obj.to_string("\u4e16\u754c\u00df")="世界ß"
new_obj.to_string("\u4E16")="世"
new_obj.to_string("\u4e1")=null
new_obj.to_string("\u4e1@")=null
new_obj.to_string("\ud840\u4e16")="�世"
new_obj.to_string("\ud840")="�"
new_obj.to_string("\udd27")="�"
2017-11-26 22:31:48 -05:00
new_obj.to_string([9,'\uDAD)=null
new_obj.to_string(null)=null
new_obj.to_string(NaN)=NaN
new_obj.to_string(-NaN)=null
new_obj.to_string(Inf)=null
new_obj.to_string(inf)=null
new_obj.to_string(Infinity)=Infinity
new_obj.to_string(infinity)=Infinity
new_obj.to_string(-Infinity)=-Infinity
new_obj.to_string(-infinity)=-Infinity
2017-11-26 22:42:40 -05:00
new_obj.to_string({ "min": Infinity, "max": -Infinity})={ "min": Infinity, "max": -Infinity }
2017-11-26 22:34:43 -05:00
new_obj.to_string(Infinity!)=Infinity
new_obj.to_string(Infinitynull)=Infinity
new_obj.to_string(InfinityXXXX)=Infinity
new_obj.to_string(-Infinitynull)=-Infinity
new_obj.to_string(-InfinityXXXX)=-Infinity
new_obj.to_string(Infinoodle)=null
new_obj.to_string(InfinAAA)=null
new_obj.to_string(-Infinoodle)=null
new_obj.to_string(-InfinAAA)=null
2017-11-26 22:31:48 -05:00
new_obj.to_string(True)=true
2017-11-26 22:34:43 -05:00
new_obj.to_string(False)=false
2020-01-02 16:18:59 +08:00
new_obj.to_string(tRue)=true
new_obj.to_string(fAlse)=false
new_obj.to_string(nAn)=NaN
new_obj.to_string(iNfinity)=Infinity
2017-11-26 22:31:48 -05:00
new_obj.to_string(12)=12
new_obj.to_string(12.3)=12.3
2020-06-29 02:14:26 +00:00
new_obj.to_string(12.3.4)=12.3
new_obj.to_string(2015-01-15)=2015
2017-11-26 22:34:43 -05:00
new_obj.to_string(12.3xxx)=12.3
2020-06-29 02:14:26 +00:00
new_obj.to_string(12.3{"a":123})=12.3
new_obj.to_string(12.3
)=12.3
new_obj.to_string(12.3 )=12.3
2017-11-26 22:31:48 -05:00
new_obj.to_string({"FoO" : -12.3E512})={ "FoO": -12.3E512 }
2019-12-27 15:07:00 +08:00
new_obj.to_string({"FoO" : -12.3e512})={ "FoO": -12.3e512 }
2017-11-26 22:31:48 -05:00
new_obj.to_string({"FoO" : -12.3E51.2})=null
2019-12-27 15:07:00 +08:00
new_obj.to_string({"FoO" : -12.3E512E12})=null
2017-11-26 22:31:48 -05:00
new_obj.to_string(["\n"])=[ "\n" ]
new_obj.to_string(["\nabc\n"])=[ "\nabc\n" ]
new_obj.to_string([null])=[ null ]
new_obj.to_string([])=[ ]
new_obj.to_string([false])=[ false ]
new_obj.to_string(["abc",null,"def",12])=[ "abc", null, "def", 12 ]
new_obj.to_string({})={ }
new_obj.to_string({ "foo": "bar" })={ "foo": "bar" }
2019-12-27 15:07:00 +08:00
new_obj.to_string({ 'foo': 'bar' })={ "foo": "bar" }
2017-11-26 22:31:48 -05:00
new_obj.to_string({ "foo": "bar", "baz": null, "bool0": true })={ "foo": "bar", "baz": null, "bool0": true }
new_obj.to_string({ "foo": [null, "foo"] })={ "foo": [ null, "foo" ] }
new_obj.to_string({ "abc": 12, "foo": "bar", "bool0": false, "bool1": true, "arr": [ 1, 2, 3, null, 5 ] })={ "abc": 12, "foo": "bar", "bool0": false, "bool1": true, "arr": [ 1, 2, 3, null, 5 ] }
new_obj.to_string({ "abc": "blue
red\ngreen" })={ "abc": "blue\nred\ngreen" }
2019-12-27 15:07:00 +08:00
new_obj.to_string(null)=null
new_obj.to_string(false)=false
2017-11-26 22:31:48 -05:00
new_obj.to_string([0e])=[ 0.0 ]
new_obj.to_string([0e+])=[ 0.0 ]
new_obj.to_string([0e+-1])=null
2019-12-27 15:07:00 +08:00
new_obj.to_string("hello world!")="hello world!"
2020-02-20 15:17:05 +08:00
new_obj.to_string([9223372036854775806])=[ 9223372036854775806 ]
new_obj.to_string([9223372036854775807])=[ 9223372036854775807 ]
new_obj.to_string([9223372036854775808])=[ 9223372036854775808 ]
new_obj.to_string([-9223372036854775807])=[ -9223372036854775807 ]
new_obj.to_string([-9223372036854775808])=[ -9223372036854775808 ]
new_obj.to_string([-9223372036854775809])=[ -9223372036854775808 ]
new_obj.to_string([18446744073709551614])=[ 18446744073709551614 ]
new_obj.to_string([18446744073709551615])=[ 18446744073709551615 ]
new_obj.to_string([18446744073709551616])=[ 18446744073709551615 ]
2012-03-31 22:51:39 -05:00
==================================
2018-03-25 18:23:42 -04:00
new_obj.to_string()=null
new_obj.to_string({})=null
==================================
json_tokener_parse_verbose() OK
2012-03-31 22:51:39 -05:00
==================================
Starting incremental tests.
2012-07-29 12:31:07 -05:00
Note: quotes and backslashes seen in the output here are literal values passed
to the parse functions. e.g. this is 4 characters: "\f"
2012-03-31 22:51:39 -05:00
json_tokener_parse({ "foo) ... got error as expected
json_tokener_parse_ex(tok, { "foo": 123 }, 14) ... OK: got object of type [object]: { "foo": 123 }
json_tokener_parse_ex(tok, { "foo": 456 }, 14) ... OK: got object of type [object]: { "foo": 456 }
json_tokener_parse_ex(tok, { "foo": 789 }, 14) ... OK: got object of type [object]: { "foo": 789 }
2019-12-27 15:07:00 +08:00
json_tokener_parse_ex(tok, /* hello */{ "foo", 18) ... OK: got correct error: continue
json_tokener_parse_ex(tok, /* hello */:/* hello */, 23) ... OK: got correct error: continue
json_tokener_parse_ex(tok, "bar"/* hello */, 16) ... OK: got correct error: continue
json_tokener_parse_ex(tok, }/* hello */, 12) ... OK: got object of type [object]: { "foo": "bar" }
json_tokener_parse_ex(tok, / hello , 8) ... OK: got correct error: expected comment
json_tokener_parse_ex(tok, /* hello"foo", 13) ... OK: got correct error: continue
json_tokener_parse_ex(tok, /* hello*"foo", 14) ... OK: got correct error: continue
json_tokener_parse_ex(tok, // hello"foo", 13) ... OK: got correct error: continue
2012-03-31 22:51:39 -05:00
json_tokener_parse_ex(tok, { "foo , 6) ... OK: got correct error: continue
json_tokener_parse_ex(tok, ": {"bar , 8) ... OK: got correct error: continue
json_tokener_parse_ex(tok, ":13}} , 6) ... OK: got object of type [object]: { "foo": { "bar": 13 } }
2020-06-02 19:17:42 +08:00
json_tokener_parse_ex(tok, "\ , 2) ... OK: got correct error: continue
json_tokener_parse_ex(tok, u , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, d , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, 8 , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, 3 , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, 4 , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, \ , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, u , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, d , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, d , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, 1 , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, e" , 2) ... OK: got object of type [string]: "ð� „ž"
json_tokener_parse_ex(tok, "\u , 3) ... OK: got correct error: continue
json_tokener_parse_ex(tok, d8 , 2) ... OK: got correct error: continue
json_tokener_parse_ex(tok, 34 , 2) ... OK: got correct error: continue
json_tokener_parse_ex(tok, \u , 2) ... OK: got correct error: continue
json_tokener_parse_ex(tok, dd , 2) ... OK: got correct error: continue
json_tokener_parse_ex(tok, 1e" , 3) ... OK: got object of type [string]: "ð� „ž"
json_tokener_parse_ex(tok, "\ud834 , 7) ... OK: got correct error: continue
json_tokener_parse_ex(tok, \udd1e" , 7) ... OK: got object of type [string]: "ð� „ž"
json_tokener_parse_ex(tok, "\ud834\ , 8) ... OK: got correct error: continue
json_tokener_parse_ex(tok, udd1e" , 6) ... OK: got object of type [string]: "ð� „ž"
json_tokener_parse_ex(tok, "\ud834\u , 9) ... OK: got correct error: continue
json_tokener_parse_ex(tok, dd1e" , 5) ... OK: got object of type [string]: "ð� „ž"
2020-06-21 18:17:40 +00:00
json_tokener_parse_ex(tok, "fff \ud834\ud, 14) ... OK: got correct error: continue
json_tokener_parse_ex(tok, d1e bar" , 8) ... OK: got object of type [string]: "fff ð� „ž bar"
json_tokener_parse_ex(tok, "fff \ud834\udd, 15) ... OK: got correct error: continue
json_tokener_parse_ex(tok, 1e bar" , 7) ... OK: got object of type [string]: "fff ð� „ž bar"
json_tokener_parse_ex(tok, "fff \ud83d\ude, 15) ... OK: got correct error: continue
json_tokener_parse_ex(tok, 00 bar" , 7) ... OK: got object of type [string]: "fff 😀 bar"
2024-11-08 22:20:40 -05:00
json_tokener_parse_ex(tok, "ä" , 4) ... OK: got object of type [string]: "ä"
json_tokener_parse_ex(tok, "ä" , 4) ... OK: got object of type [string]: "ä"
2012-03-31 22:51:39 -05:00
json_tokener_parse_ex(tok, { "foo , 6) ... OK: got correct error: continue
json_tokener_parse_ex(tok, : "bar"} , 8) ... OK: got correct error: unexpected character
json_tokener_parse_ex(tok, { "foo , 6) ... OK: got correct error: continue
json_tokener_parse_ex(tok, ": {"bar , 8) ... OK: got correct error: continue
json_tokener_parse_ex(tok, ":13}}XXXX , 10) ... OK: got object of type [object]: { "foo": { "bar": 13 } }
json_tokener_parse_ex(tok, XXXX , 4) ... OK: got correct error: unexpected character
json_tokener_parse_ex(tok, {"x": 123 }"X", 14) ... OK: got object of type [object]: { "x": 123 }
json_tokener_parse_ex(tok, "Y" , 3) ... OK: got object of type [string]: "Y"
2020-04-20 16:06:34 +00:00
json_tokener_parse_ex(tok, {"foo":9}{"bar":8}, 18) ... OK: got correct error: unexpected character
json_tokener_parse_ex(tok, {"foo":9}{"bar":8}, 18) ... OK: got object of type [object]: { "foo": 9 }
json_tokener_parse_ex(tok, {"b":8}ignored garbage, 22) ... OK: got object of type [object]: { "b": 8 }
2012-03-31 22:51:39 -05:00
json_tokener_parse_ex(tok, 1 , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, 2 , 2) ... OK: got object of type [int]: 12
2017-02-26 16:22:45 +00:00
json_tokener_parse_ex(tok, 12{ , 3) ... OK: got object of type [int]: 12
2019-12-27 15:07:00 +08:00
json_tokener_parse_ex(tok, [02] , 4) ... OK: got correct error: number expected
2020-06-27 15:32:19 +00:00
json_tokener_parse_ex(tok, 0e+0 , 5) ... OK: got object of type [double]: 0e+0
json_tokener_parse_ex(tok, [0e+0] , 6) ... OK: got object of type [array]: [ 0e+0 ]
json_tokener_parse_ex(tok, 0e , 2) ... OK: got correct error: continue
json_tokener_parse_ex(tok, 0e , 3) ... OK: got object of type [double]: 0
json_tokener_parse_ex(tok, 0e , 3) ... OK: got correct error: unexpected end of data
json_tokener_parse_ex(tok, [0e] , 4) ... OK: got object of type [array]: [ 0 ]
json_tokener_parse_ex(tok, [0e] , 4) ... OK: got correct error: number expected
json_tokener_parse_ex(tok, 0e+ , 3) ... OK: got correct error: continue
json_tokener_parse_ex(tok, 0e+ , 4) ... OK: got object of type [double]: 0
json_tokener_parse_ex(tok, 0e+ , 4) ... OK: got correct error: unexpected end of data
json_tokener_parse_ex(tok, [0e+] , 5) ... OK: got object of type [array]: [ 0 ]
json_tokener_parse_ex(tok, [0e+] , 5) ... OK: got correct error: number expected
json_tokener_parse_ex(tok, 0e- , 3) ... OK: got correct error: continue
json_tokener_parse_ex(tok, 0e- , 4) ... OK: got object of type [double]: 0
json_tokener_parse_ex(tok, 0e- , 4) ... OK: got correct error: unexpected end of data
json_tokener_parse_ex(tok, [0e-] , 5) ... OK: got object of type [array]: [ 0 ]
json_tokener_parse_ex(tok, [0e-] , 5) ... OK: got correct error: number expected
2020-06-29 02:14:26 +00:00
json_tokener_parse_ex(tok, 0e+- , 5) ... OK: got object of type [double]: 0
2020-06-27 15:32:19 +00:00
json_tokener_parse_ex(tok, 0e+- , 5) ... OK: got correct error: number expected
json_tokener_parse_ex(tok, [0e+-] , 6) ... OK: got correct error: number expected
2017-02-26 16:22:45 +00:00
json_tokener_parse_ex(tok, false , 5) ... OK: got correct error: continue
json_tokener_parse_ex(tok, false , 6) ... OK: got object of type [boolean]: false
json_tokener_parse_ex(tok, true , 4) ... OK: got correct error: continue
json_tokener_parse_ex(tok, true , 5) ... OK: got object of type [boolean]: true
json_tokener_parse_ex(tok, null , 4) ... OK: got correct error: continue
json_tokener_parse_ex(tok, null , 5) ... OK: got object of type [null]: null
2017-11-27 00:08:59 -05:00
json_tokener_parse_ex(tok, Infinity , 9) ... OK: got object of type [double]: Infinity
json_tokener_parse_ex(tok, infinity , 9) ... OK: got object of type [double]: Infinity
json_tokener_parse_ex(tok, infinity , 9) ... OK: got correct error: unexpected character
2024-11-08 22:20:40 -05:00
json_tokener_parse_ex(tok, -infinity , 10) ... OK: got object of type [double]: -Infinity
2017-11-27 00:08:59 -05:00
json_tokener_parse_ex(tok, -infinity , 10) ... OK: got correct error: unexpected character
json_tokener_parse_ex(tok, inf , 3) ... OK: got correct error: continue
json_tokener_parse_ex(tok, inity , 6) ... OK: got object of type [double]: Infinity
json_tokener_parse_ex(tok, -inf , 4) ... OK: got correct error: continue
json_tokener_parse_ex(tok, inity , 6) ... OK: got object of type [double]: -Infinity
json_tokener_parse_ex(tok, i , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, n , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, f , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, i , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, n , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, i , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, t , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, y , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, , 1) ... OK: got object of type [double]: Infinity
json_tokener_parse_ex(tok, - , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, inf , 3) ... OK: got correct error: continue
json_tokener_parse_ex(tok, ini , 3) ... OK: got correct error: continue
json_tokener_parse_ex(tok, ty , 3) ... OK: got object of type [double]: -Infinity
json_tokener_parse_ex(tok, - , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, i , 1) ... OK: got correct error: continue
json_tokener_parse_ex(tok, nfini , 5) ... OK: got correct error: continue
json_tokener_parse_ex(tok, ty , 3) ... OK: got object of type [double]: -Infinity
json_tokener_parse_ex(tok, -i , 2) ... OK: got correct error: continue
json_tokener_parse_ex(tok, nfinity , 8) ... OK: got object of type [double]: -Infinity
2017-11-27 08:48:08 -05:00
json_tokener_parse_ex(tok, InfinityX , 10) ... OK: got object of type [double]: Infinity
json_tokener_parse_ex(tok, X , 1) ... OK: got correct error: unexpected character
json_tokener_parse_ex(tok, Infinity1234, 13) ... OK: got object of type [double]: Infinity
json_tokener_parse_ex(tok, 1234 , 5) ... OK: got object of type [int]: 1234
json_tokener_parse_ex(tok, Infinity9999, 8) ... OK: got correct error: continue
json_tokener_parse_ex(tok, 1234 , 5) ... OK: got object of type [double]: Infinity
json_tokener_parse_ex(tok, 1234 , 5) ... OK: got object of type [int]: 1234
2022-10-30 19:42:42 +00:00
json_tokener_parse_ex(tok, [9223372036854775807], 22) ... OK: got object of type [array]: [ 9223372036854775807 ]
json_tokener_parse_ex(tok, [9223372036854775808], 22) ... OK: got object of type [array]: [ 9223372036854775808 ]
json_tokener_parse_ex(tok, [-9223372036854775808], 23) ... OK: got object of type [array]: [ -9223372036854775808 ]
json_tokener_parse_ex(tok, [-9223372036854775809], 23) ... OK: got object of type [array]: [ -9223372036854775808 ]
json_tokener_parse_ex(tok, [-9223372036854775809], 23) ... OK: got correct error: number expected
json_tokener_parse_ex(tok, [18446744073709551615], 23) ... OK: got object of type [array]: [ 18446744073709551615 ]
json_tokener_parse_ex(tok, [18446744073709551616], 23) ... OK: got object of type [array]: [ 18446744073709551615 ]
json_tokener_parse_ex(tok, [18446744073709551616], 23) ... OK: got correct error: number expected
2024-11-08 22:20:40 -05:00
json_tokener_parse_ex(tok, 18446744073709551616, 21) ... OK: got object of type [int]: 18446744073709551615
2022-10-30 19:42:42 +00:00
json_tokener_parse_ex(tok, 18446744073709551616, 21) ... OK: got correct error: unexpected end of data
json_tokener_parse_ex(tok, [9223372036854775808.0], 24) ... OK: got object of type [array]: [ 9223372036854775808.0 ]
json_tokener_parse_ex(tok, [-9223372036854775809.0], 25) ... OK: got object of type [array]: [ -9223372036854775809.0 ]
2024-11-08 22:20:40 -05:00
json_tokener_parse_ex(tok, [-9223372036854775809.0], 25) ... OK: got object of type [array]: [ -9223372036854775809.0 ]
2022-10-30 19:42:42 +00:00
json_tokener_parse_ex(tok, [18446744073709551615.0], 25) ... OK: got object of type [array]: [ 18446744073709551615.0 ]
json_tokener_parse_ex(tok, [18446744073709551616.0], 25) ... OK: got object of type [array]: [ 18446744073709551616.0 ]
2024-11-08 22:20:40 -05:00
json_tokener_parse_ex(tok, [18446744073709551616.0], 25) ... OK: got object of type [array]: [ 18446744073709551616.0 ]
2017-02-26 16:22:45 +00:00
json_tokener_parse_ex(tok, noodle , 7) ... OK: got correct error: null expected
json_tokener_parse_ex(tok, naodle , 7) ... OK: got correct error: null expected
json_tokener_parse_ex(tok, track , 6) ... OK: got correct error: boolean expected
2020-01-02 16:18:59 +08:00
json_tokener_parse_ex(tok, fail , 5) ... OK: got correct error: boolean expected
2020-06-21 17:36:38 +00:00
json_tokener_parse_ex(tok, null123 , 8) ... OK: got object of type [null]: null
2017-02-26 16:22:45 +00:00
json_tokener_parse_ex(tok, 123 , 4) ... OK: got object of type [int]: 123
2020-06-21 17:36:38 +00:00
json_tokener_parse_ex(tok, nullx , 6) ... OK: got object of type [null]: null
2017-02-26 16:22:45 +00:00
json_tokener_parse_ex(tok, x , 2) ... OK: got correct error: unexpected character
json_tokener_parse_ex(tok, {"a":1}{"b":2}, 15) ... OK: got object of type [object]: { "a": 1 }
json_tokener_parse_ex(tok, {"b":2} , 8) ... OK: got object of type [object]: { "b": 2 }
2020-06-29 02:14:26 +00:00
json_tokener_parse_ex(tok, 2015-01-15 , 11) ... OK: got object of type [int]: 2015
json_tokener_parse_ex(tok, -01-15 , 7) ... OK: got object of type [int]: -1
json_tokener_parse_ex(tok, -15 , 4) ... OK: got object of type [int]: -15
json_tokener_parse_ex(tok, 2015 01 15 , 11) ... OK: got object of type [int]: 2015
json_tokener_parse_ex(tok, 01 15 , 7) ... OK: got object of type [int]: 1
json_tokener_parse_ex(tok, 15 , 4) ... OK: got object of type [int]: 15
2012-03-31 22:51:39 -05:00
json_tokener_parse_ex(tok, "blue" , 6) ... OK: got object of type [string]: "blue"
2012-07-29 12:31:07 -05:00
json_tokener_parse_ex(tok, "\"" , 4) ... OK: got object of type [string]: "\""
json_tokener_parse_ex(tok, "\\" , 4) ... OK: got object of type [string]: "\\"
json_tokener_parse_ex(tok, "\b" , 4) ... OK: got object of type [string]: "\b"
2013-01-28 19:06:49 -08:00
json_tokener_parse_ex(tok, "\f" , 4) ... OK: got object of type [string]: "\f"
2012-07-29 12:31:07 -05:00
json_tokener_parse_ex(tok, "\n" , 4) ... OK: got object of type [string]: "\n"
json_tokener_parse_ex(tok, "\r" , 4) ... OK: got object of type [string]: "\r"
json_tokener_parse_ex(tok, "\t" , 4) ... OK: got object of type [string]: "\t"
2015-11-28 20:00:30 -06:00
json_tokener_parse_ex(tok, "\/" , 4) ... OK: got object of type [string]: "\/"
json_tokener_parse_ex(tok, "/" , 3) ... OK: got object of type [string]: "\/"
2019-12-27 15:07:00 +08:00
json_tokener_parse_ex(tok, "\a" , 4) ... OK: got correct error: invalid string sequence
2024-11-08 22:20:40 -05:00
json_tokener_parse_ex(tok, 'foo' , 5) ... OK: got object of type [string]: "foo"
2019-12-27 15:07:00 +08:00
json_tokener_parse_ex(tok, 'foo' , 5) ... OK: got correct error: unexpected character
2012-03-31 22:51:39 -05:00
json_tokener_parse_ex(tok, [1,2,3] , 7) ... OK: got object of type [array]: [ 1, 2, 3 ]
2019-12-27 15:07:00 +08:00
json_tokener_parse_ex(tok, [1,2,3} , 7) ... OK: got correct error: array value separator ',' expected
json_tokener_parse_ex(tok, {"a"} , 5) ... OK: got correct error: object property name separator ':' expected
json_tokener_parse_ex(tok, {"a":1] , 7) ... OK: got correct error: object value separator ',' expected
2020-01-02 16:18:59 +08:00
json_tokener_parse_ex(tok, {"a"::1} , 8) ... OK: got correct error: unexpected character
json_tokener_parse_ex(tok, {"a":} , 6) ... OK: got correct error: unexpected character
json_tokener_parse_ex(tok, {"a":1,"a":2}, 13) ... OK: got object of type [object]: { "a": 2 }
json_tokener_parse_ex(tok, "a":1} , 6) ... OK: got object of type [string]: "a"
json_tokener_parse_ex(tok, {"a":1 , 6) ... OK: got correct error: continue
json_tokener_parse_ex(tok, [,] , 3) ... OK: got correct error: unexpected character
json_tokener_parse_ex(tok, [,1] , 4) ... OK: got correct error: unexpected character
2012-03-31 22:51:39 -05:00
json_tokener_parse_ex(tok, [1,2,3,] , 8) ... OK: got object of type [array]: [ 1, 2, 3 ]
2013-03-31 20:05:36 -05:00
json_tokener_parse_ex(tok, [1,2,3,] , 8) ... OK: got correct error: unexpected character
2024-11-08 22:20:40 -05:00
json_tokener_parse_ex(tok, [1,2,,3,] , 9) ... OK: got correct error: unexpected character
json_tokener_parse_ex(tok, [1,2,,3,] , 9) ... OK: got correct error: unexpected character
2013-03-31 20:05:36 -05:00
json_tokener_parse_ex(tok, {"a":1,} , 8) ... OK: got correct error: unexpected character
2020-01-08 19:42:05 +08:00
json_tokener_parse_ex(tok, "123asc$%&" , 11) ... OK: got object of type [string]: "123asc$%&"
json_tokener_parse_ex(tok, "123asc$%&" , 11) ... OK: got object of type [string]: "123asc$%&"
json_tokener_parse_ex(tok, "世界" , 8) ... OK: got object of type [string]: "世界"
json_tokener_parse_ex(tok, "ä¸ , 3) ... OK: got correct error: invalid utf-8 string
json_tokener_parse_ex(tok, –界" , 5) ... OK: got correct error: invalid utf-8 string
json_tokener_parse_ex(tok, "世界" , 8) ... OK: got object of type [string]: "世界"
json_tokener_parse_ex(tok, "πφ" , 6) ... OK: got object of type [string]: "πφ"
json_tokener_parse_ex(tok, "𥑕" , 6) ... OK: got object of type [string]: "𥑕"
json_tokener_parse_ex(tok, "æ� N" , 5) ... OK: got correct error: invalid utf-8 string
json_tokener_parse_ex(tok, "æ� N" , 5) ... OK: got object of type [string]: "æ� N"
json_tokener_parse_ex(tok, "ÀîÅô" , 6) ... OK: got correct error: invalid utf-8 string
json_tokener_parse_ex(tok, "ÀîÅô" , 6) ... OK: got object of type [string]: "ÀîÅô"
json_tokener_parse_ex(tok, "世" , 7) ... OK: got object of type [string]: "世"
json_tokener_parse_ex(tok, � "世" , 8) ... OK: got correct error: invalid utf-8 string
json_tokener_parse_ex(tok, [ � 1] , 5) ... OK: got correct error: invalid utf-8 string
json_tokener_parse_ex(tok, Infinity , 9) ... OK: got object of type [double]: Infinity
json_tokener_parse_ex(tok, Inf� nity , 8) ... OK: got correct error: invalid utf-8 string
json_tokener_parse_ex(tok, "\ud855\udc55", 15) ... OK: got object of type [string]: "𥑕"
json_tokener_parse_ex(tok, "\ud855Àudc55", 14) ... OK: got correct error: invalid utf-8 string
json_tokener_parse_ex(tok, "\ud0031À" , 10) ... OK: got correct error: invalid utf-8 string
json_tokener_parse_ex(tok, 11� 11 , 5) ... OK: got correct error: invalid utf-8 string
json_tokener_parse_ex(tok, {"1� ":1} , 8) ... OK: got correct error: invalid utf-8 string
2024-09-15 11:59:05 -04:00
json_tokener_parse_ex(tok, "0
", 36) ... OK: got object of type [string]: "0\u0001\u0002\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f"
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, "
" , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, "
" , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
2024-11-08 22:20:40 -05:00
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence
2012-03-31 22:51:39 -05:00
json_tokener_parse_ex(tok, " " , 3) ... OK: got correct error: invalid string sequence