JSON.parse解析报错解决方法
res = JSON.parse(result.replace(/\n/g,"\\n").replace(/\r/g,"\\r"));//转义
str_o = res.result;
str_n = str_o.replace(/\\n/g,"\r\n");//解析后再转回来
摘自:https://blog.csdn.net/qq_31934975/article/details/78364301
res = JSON.parse(result.replace(/\n/g,"\\n").replace(/\r/g,"\\r"));//转义
str_o = res.result;
str_n = str_o.replace(/\\n/g,"\r\n");//解析后再转回来
摘自:https://blog.csdn.net/qq_31934975/article/details/78364301