0
我有一些JSON,看起來像這樣:如何在Javascript中隱藏JSON?
'"geocoded_waypoints" : [
{
"geocoder_status" : "OK",
"partial_match" : true,
"place_id" : "ChIJ7_V-Dou62YgRXjw0MYaotfs",
"types" : [ "locality", "political" ]
},
{
"geocoder_status" : "OK",
"partial_match" : true,
"place_id" : "ChIJRZdD6h5-1YcR_rYaYBXzk9E",
"types" : [ "locality", "political" ]
}
而且我希望它被解析爲普通JSON。我怎樣才能使用JavaScript做到這一點?
's.replace(/ " /克,「')' – dandavis
是有一些方法來取消轉義它 – RadleyMith
修復任何代碼生成的JSON產生用實際的雙引號糾正JSON。 –