1,eval方式解析
var str = '{"name":"jack"}'; var json = eval('(' + str + ')');
2,使用全局的JSON对象
var str = '{ "name": "Violet", "occupation": "character" }'; var obj = str.parseJSON();
1,eval方式解析
var str = '{"name":"jack"}'; var json = eval('(' + str + ')');
2,使用全局的JSON对象
var str = '{ "name": "Violet", "occupation": "character" }'; var obj = str.parseJSON();