1 -- Additional path that may be required
5 [[{1:[1213.3e12, 123 , 123, "hello", [12, 2], {1:true /*test*/}]}]],
6 [[{"username":"demo1","message":null,"password":""}]],
7 [[{"challenge":"b64d-fnNQ6bRZ7CYiNIKwmdHoNgl9JR9MIYtzjBhpQzYXCFrgARt9mNmgUuO7FoODGr1NieT9yTeB2SLztGkvIA4NXmN9Bi27hqx1ybJIQq6S2L-AjQ3VTDClSmCsYFPOm9EMVZDZ0jhBX1fXw3o9VYj1j9KzSY5VCSAzGqYo-cBPY\n.b64","cert":"b64MIIGyjCCBbKgAwIBAgIKFAC1ZgAAAAAUYzANBgkqhkiG9w0BAQUFADBZMRUwEwYKCZImiZPyLGQBGRYFbG9tp8uQuFjWGS_KxTHXz9vkLNFjOoZY2bOwzsdEpshuYSdvX-9bRvHTQcoMNz8Q9nXG1aMl5x1nbV5byQNTCJlz4gzMJeNfeKGcipdCj7B6e_VpF-n2P-dFZizUHjxMksCVZ3nTr51x3Uw\n.b64","key":"D79B30BA7954DF520B44897A6FF58919"}]],
8 [[{"key":"D79B30BA7954DF520B44897A6FF58919"}]],
14 "Title": "View from 15th Floor",
16 "Url": "http://www.example.com/image/481989943",
20 "IDs": [116, 943, 234, 38793]
27 "Longitude": -122.3959,
29 "City": "SAN FRANCISCO",
36 "Latitude": 37.371991,
37 "Longitude": -122.026020,
45 [[[null,true,[1,2,3],"hello\"],[world!"] ]],
46 [[ [{"0":"tan\\\\","model\\\\":"sedan"},{"0":"red","model":"sports"}] ]],
47 [[ {"1":"one","2":"two","5":"five"} ]],
48 [=[ [[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]] ]=]
51 for i
, v
in ipairs(testStrings
) do
52 print("Testing: #" .. i
)
53 local dec
= json
.decode(v
)
54 json
.util
.printValue(dec
, "JSONVALUE")
55 local reenc
= json
.encode(dec
)
56 print("RE_ENC: ", reenc
)
57 local redec
= json
.decode(reenc
)
58 json
.util
.printValue(redec
, "REDECJSONVALUE")
62 {[300] = {nil, true, 1,2,3, nil, 3}}
65 for _
, v
in ipairs(testValues
) do
66 local ret
= json
.encode(v
)
68 local dec
= json
.decode(ret
)
69 json
.util
.printValue(dec
, "Encoded value")
70 print("Re-encoded", json
.encode(dec
))