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

时间:2020-03-10 17:36:08   收藏:0   阅读:572

[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‘

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!