On Tue, Sep 13, 2011 at 12:11 AM, Ron Wilson <[email protected]> wrote:

> reason to embed JSON into XML or HTML. If Javascript can be embedded
> in a webpage, why not JSON?
>

As a point of trivia: the JSON grammar allows, but does not require, that
forward-slash characters be escaped by a backslash. The reason for this IS
the embedding in HTML (Doug Crockford responded to my query about the reason
for escaping /). If you have <\/...> in JSON inside HTML, it doesn't confuse
the HTML page like non-escaping it does.


> FYI, where I work, we are required to code defensively, so I have
> acquired a tendancy to look for problems so I can better defend
> against them. Nothing's perfect, of course.
>

i'd never heard of this particular problem until today.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to