举例数据 var data = "含有换行的字符串" var obj = JSON.parse(data.replace(/\n/g," ")) console.info(obj) 解析json数据成功