Csharp/C#教程:快速解决owin返回json字符串多带了双引号"多了重string转义字符串分享

解决方法:

[HttpGet] publicHttpResponseMessagegetsystemtime() { cltimetime=newcltime(); time.datetime=DateTime.Now.ToString("yyyy-MM-ddHH:mm:ss"); stringrelsut=JsonConvert.SerializeObject(time); varresp=newHttpResponseMessage{Content=newStringContent(relsut,System.Text.Encoding.UTF8,"application/json")}; returnresp; }

上述就是C#学习教程:快速解决owin返回json字符串多带了双引号"多了重string转义字符串分享的全部内容,如果对大家有所用处且需要了解更多关于C#学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/cdevelopment/907495.html

(0)
上一篇 2021年10月24日
下一篇 2021年10月24日

精彩推荐