Just tried in Chrome Dev Tools:
JSON.parse("{lhs: \"32 Japanese yen\",rhs: \"0.30613818 Euros\",error: \"\",icc: true}") SyntaxError: Unexpected token l JSON.parse('{lhs: "32 Japanese yen",rhs: "0.30613818 Euros",error: "",icc: true}') SyntaxError: Unexpected token l JSON.parse('{lhs: "32 Japanese yen",rhs: "0.30613818 Euros",error: "",icc: 1}') SyntaxError: Unexpected token l JSON.parse('{"lhs": "32 Japanese yen","rhs": "0.30613818 Euros","error": "","icc": true}') Object error: "" icc: true lhs: "32 Japanese yen" rhs: "0.30613818 Euros" __proto__: Object
Thus, it seems that the "valid" JSON string should use a double quote " to enclose all possible places.
Actually this also happens in PHP json_decode .
I don't know about Win8JS development, so I'm not sure if you can use response.responeJSON or something like that, but the direct analysis of response.responseText seems unsuccessful.
If you really need to use responseText , consider the dangerous eval @Cerbrus method.
source share