json-parse with inner double quote
Posted: Thu Jun 20, 2013 11:56 am
Hi.
json-parse cannot handle JSON data with inner double quote chars.
This problem doesn't occur in previous json module.
P.S. Is json module no longer available?
Documentation page is alive. but download link is 404.
http://www.newlisp.org/code/modules/json.lsp.html
json-parse cannot handle JSON data with inner double quote chars.
Code: Select all
> (setf data [text]{"foo": ["bar", "\"baz\""]}[/text])
"{\"foo\": [\"bar\", \"\\\"baz\\\"\"]}"
> (json-parse data)
nil
> (json-error)
("invalid JSON array format" 19)
Code: Select all
> (module "json.lsp")
MAIN
> (json2expr data)
(("foo" ("bar" "\"baz\"")))
Documentation page is alive. but download link is 404.
http://www.newlisp.org/code/modules/json.lsp.html