如何将JSON响应中的ASP.NET WebMethod的'd'标识符更改为其他名称? [英] How to change ASP.NET WebMethod's 'd' identifier in a JSON response, to a different name?
本文介绍了如何将JSON响应中的ASP.NET WebMethod的'd'标识符更改为其他名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这有效:通过jQuery,我正在使用 jQuery.ajax(..)呼叫页面例如Default.aspx/GetStatus 具有 WebMethod 属性:
This works: through jQuery I'm using a jQuery.ajax(..) call to a page e.g. Default.aspx/GetStatus having a WebMethod attribute:
// Default.aspx
[WebMethod()]
static public bool GetStatus(long id)
{ //...
JSON响应包含格式为{ d: true }
的正确布尔值.但是,我不了解生成的"d"成员名称的来源.
"d"标识符从何而来(如何确定)以及如何更改其名称?
The JSON response contains the correct boolean value in the format { d: true }
. However I don't understand the origin of the resulting "d" member name.
Where does the "d" identifier come from (how is it decided) and how can I change its name?
推荐答案
这篇关于如何将JSON响应中的ASP.NET WebMethod的'd'标识符更改为其他名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文