json格式:
{"ID":"4","PICDATAS":"[{"picDevNo": 1},{"picDevNo": 1},{"picDevNo": 1}]"
}
如果出现 "[ ]" ,用 json.parse 会报错
方法:
//替换所有
, ,
var a = result.root.replace(/(
)|(
)|(
)|( )/g, '');
//将"[转为[
a = a.replace(/("[)/g, '[');
//将]"转为]
a = a.replace(/(]")/g, ']');