首页 > Web开发 > 详细

webserver 返回json 如何去掉 <string xmlns="http://tempuri.org/">

时间:2020-03-10 17:36:08      阅读:572      评论:0      收藏:0      [点我收藏+]

[WebMethod]
  public void GetJson(String sJson)
  {
    Context.Response.Charset = "UTF-8"; //设置字符集类型
    Context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("UTF-8");
    Context.Response.Write(sJson);
    Context.Response.End();
  }

 

 url: ‘WebService1.asmx/GetJson‘

webserver 返回json 如何去掉 <string xmlns="http://tempuri.org/">

原文:https://www.cnblogs.com/t-mac-1/p/12456592.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!