.NET ASMX - Returning Pure JSON?

后端 未结 2 555
悲哀的现实
悲哀的现实 2021-02-04 20:28

I am going nuts here. I\'ve looked at the following entries and none of them are correcting the aberrant behavior I am seeing:

  • How to return JSON
2条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-04 21:08

    What's the "Content-Type" set to on the request to the method?

    From what I've done with the ASP.NET, if it's set to text/xml, you'll get back XML; but if it's set to application/json, you'll get JSON back.

提交回复
热议问题