[cl-json-devel] (encode-json-to-string "</div>") => "\"<\\/div>\"" ?
Henrik Hjelte
henrik at evahjelte.com
Tue Jun 16 18:41:12 UTC 2009
On Tue, Jun 16, 2009 at 7:38 PM, Leslie P.
Polzer<sky at viridian-project.de> wrote:
>
> Where do those two extra backslashes in front of the slash
> come from? Is this intended?
>
> Thanks,
>
> Leslie
Json allows / in strings, but if I am reading the diagram on json.org
correctly prefers that it is prefixed by a backslash
like this \/ . Probably prefered, because why would it be in the list
of backslashed characters otherwise? See the mentioning about solidus
in the string diagram. I don't really know why.
And the first backslash is the lisp backslash for the backslash character.
So it is valid JSON, and probably prefered to /.
/Henrik
More information about the cl-json-devel
mailing list