Returning HTML from JSON webservice - what is the “.d”?

前端 未结 2 478
时光说笑
时光说笑 2020-12-09 21:42

This is one of those situations where I\'ve had to pick up and run with a new tech without having time to learn the foundations!

I have the following js function whi

2条回答
  •  臣服心动
    2020-12-09 22:12

    ASP.Net nests the JSON data in the d property because of cross site scripting attacks.

    It is possible to return script code as the JSON response, and nesting the data inside the .d property makes it unparsable to the browser.

    See here: JSON vulnerability

    Regards K

提交回复
热议问题