标签:off ltm coff str 解决方法 ted script ring esc
项目中对象转json字符串时,如下:
JsonSerializerSettings jsetting = new JsonSerializerSettings();
jsetting.DefaultValueHandling = DefaultValueHandling.Ignore;
return JsonConvert.SerializeObject(resultMoldels, Formatting.Indented, jsetting);
发现返回的字符串中包含换行符 \r\n
"{\r\n \"result\": true,\r\n \"msg\": \"OK\",\r\n \"data\": [\r\n \"success\",\r\n \"123456789\",\r\n \"987654321\"\r\n ]\r\n}"
解决方法:
Formatting.Indented 修改成 Formatting.None
标签:off ltm coff str 解决方法 ted script ring esc
原文地址:http://www.cnblogs.com/zhangs1986/p/6656475.html