緣由:特殊字符致使json字符串轉換成json對象出錯json
解決:找到初始值的地方進行過濾spa
代碼以下:對象
theString = theString.Replace(">", ">"); 字符串
theString = theString.Replace("<", "<"); string
theString = theString.Replace(" ", " "); class
theString = theString.Replace("\"", """); co
theString = theString.Replace("\'", "'"); 字符
theString = theString.Replace("\\", "\\\\");//對斜線的轉義
theString = theString.Replace("\n", "\\n");
theString = theString.Replace("\r", "\\r");