[cl-json-devel] (no subject)

Henrik Hjelte henrik at evahjelte.com
Tue Oct 31 09:23:50 UTC 2006


On Sun, 2006-10-29 at 18:42 -0500, Ben Hyde wrote:
> Suggestion:
> 
>   (defun json-escaped-char-to-lisp(json-escaped-char)
>    (or
>      (cdr (assoc json-escaped-char *json-lisp-escaped-chars*))
>      json-escaped-char))
> 
> The existing implementation is correct, just not particularly  
> tolerant of what people actually do.  In particular it  parsing of  
> json from del.icio.us.
> 
> It can handle:
>   (json:decode-json-from-string "right's of man")
> but not
>   (json:decode-json-from-string "right\\'s of man")
> 
> "generous in what you accept", and all that.
>   - ben

I'd say sometimes it is good to be tolerant and sometimes not, so I have
pushed a patch that allows both ways. If you want to allow non-strict
json, set *use-strict-json-rules* to nil. If only strict json is
allowed, the parser will now signal a json-parse-error.

/Henrik 




More information about the cl-json-devel mailing list