How to change ASP.NET WebMethod's 'd' identifier in a JSON response, to a different name?

我与影子孤独终老i 提交于 2019-12-11 09:06:16

问题


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)
{ //...

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?


回答1:


What does .d in JSON mean?



来源:https://stackoverflow.com/questions/4412432/how-to-change-asp-net-webmethods-d-identifier-in-a-json-response-to-a-differ

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!