原因:特殊字符导致json字符串转换成json对象出错
解决:找到初始值的地方进行过滤
代码如下:
class="alt"> theString = theString.Replace(">", ">");
theString = theString.Replace("<", "<");
theString = theString.Replace(" ", " ");
theString = theString.Replace("\"", """);
theString = theString.Replace("\'", "'");
theString = theString.Replace("\\", "\\\\");//对斜线的转义
theString = theString.Replace("\n", "\\n");
theString = theString.Replace("\r", "\\r");