Re: is json.l capable to handle escaped quotation marks in strings?

2016-10-31 Thread O.Hamann
Thank you very much for your quick and precise answers, Rick and Alex. As almost always, I tried to work on tasks by myself than to let piL do the job with ease :-) Thank you very much. Regards, Olaf

Re: is json.l capable to handle escaped quotation marks in strings?

2016-10-31 Thread Alexander Burger
On Mon, Oct 31, 2016 at 07:29:47AM +0100, Alexander Burger wrote: > Haha, I should read mails more throughly. My answer was for 'readJson', > but you asked for 'parseJson'. Rick's answer is correct. I was focused on 'readJson' because in PicoLisp the recommended way is to parse input directly via

Re: is json.l capable to handle escaped quotation marks in strings?

2016-10-31 Thread Alexander Burger
Hi Olaf, Rick, On Sun, Oct 30, 2016 at 07:12:31PM -0400, r...@tamos.net wrote: > On Sun, 30 Oct 2016 23:23 +0100, O.Hamann wrote: > > -> (("sentence" . "value with 'single quotes' is valid json")) > > > > But I don't know how to escape the double quotes (QUOTATION MARK) to > > use instead of the

Re: is json.l capable to handle escaped quotation marks in strings?

2016-10-31 Thread Alexander Burger
Hi Olaf, > {"sentence":"value string with \"escaped quotation marks\" is valid json"} > > is valid json, but parseJson returns 'BAD JSON'. How did you try it? If I put the above into a file "a", and then do $ pil lib/json.l + : (in "a" (readJson)) -> (("sentence" . "value string with

Re: is json.l capable to handle escaped quotation marks in strings?

2016-10-30 Thread rick
On Sun, 30 Oct 2016 23:23 +0100, O.Hamann wrote: > (load "@lib/json.l") > # this works fine: > (parseJson "{\"sentence\":\"value string with 'single quotes' is valid > json\"}") > -> (("sentence" . "value with 'single quotes' is valid json")) > > But I don't know how to escape the double quotes