json-test.lsp: http://pastebin.com/9nqJHSW3
The results are here:
Code: Select all
> newlisp -v
newLISP v.10.5.2 32-bit on Win32 IPv4/6 UTF-8 libffi.
> newlisp json-test.lsp
fail1.json -> pass : "A JSON payload should be an object or array, not a string."
fail7.json -> pass : ["Comma after the close"],
fail8.json -> pass : ["Extra close"]]
fail10.json -> pass : {"Extra value after close": true} "misplaced quoted value"
fail13.json -> pass : {"Numbers cannot have leading zeroes": 013}
fail15.json -> pass : ["Illegal backslash escape: \x15"]
fail17.json -> pass : ["Illegal backslash escape: \017"]
fail18.json -> pass : [[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]
fail25.json -> pass : [" tab character in string "]
fail26.json -> pass : ["tab\ character\ in\ string\ "]
fail27.json -> pass : ["line
break"]
fail28.json -> pass : ["line\
break"]
PS. A strange things, fail18.json also passes on JSONLint (http://jsonlint.com/).