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">
: "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
Post a Comment