javascript - JSON: why are forward slashes escaped? -


The reason for this is "escape" me.

is avoided by forward slash, so a hash is sorted as {"a"> < Code> {"a": "a \ / b / c"} : "a / b / c"} .

Why?

JSON You do not need to do this, it allows you to do this. It also allows you to use "\ u0061" for "A", but it is not required & lt; Script & gt; \ / permits the \ / while embedding JS in the tag & lt; / , such as SEB points out of the information.

Some ASP.NET Ajax / JSON APIs of Microsoft have used this defense to add additional information, for example, a date time in "\ / date (milliseconds) \ / ". (Yuk)


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -