我正在通过AJAX调用获得下面的JSON,这是无效的,因为在项目符号之后\t,由于这个我在JSON.Parse(data.d)函数中得到javaScript错误。你能建议一下如何处理这种情况吗?
{ "Initial" :[
{"IncidentNumber" : "INCB68686857575" ,
"IncidentStart": "22-Apr-2016 11:03" ,
"Title": "aaa",
"ServiceName": "a",
"Status": "Service Down",
"UsersImpacted": "MULTIPLE" ,
"Circle": "a" ,
"RecoveryActivity": "•\tJohn Michel USA Country nextline•\tABC DEF GDH LMN India" ,
"EstimatedRestorationTime": "a" ,
"OwningOrLeadTeam": "a" ,
"SupportingTeams": "a" ,
"IncidentLead": "a",
"Resiliency": "To Be Determined",
"NextUpdateGMTTime": "17-May-2016 12:48" }]
}
发布于 2016-05-17 21:36:59
使用replace
var stringified = JSON.stringify(data);
JSON.parse(stringified.replace(/"/g,'"')); https://stackoverflow.com/questions/37277691
复制相似问题