1> conversion supported by jQuery plug-in:
$. ParseJSON (jsonstr); // jQuery. parseJSON (jsonstr), which can convert a json string to a json object
2> browsers support conversion methods (Firefox, chrome, opera, safari, ie9, and ie8:
JSON. parse (jsonstr); // you can convert a json string to a json object.
JSON. stringify (jsonobj); // you can convert a json object to a json string.
Note: For ie8 (compatible mode), ie7 and ie6 do not have JSON objects. We recommend using the official JSON method to introduce json. js.
3> conversion modes supported by Javascript:
Eval ('+ jsonstr +'); // you can convert a json string to a json object. Enclose a pair of parentheses outside the json character.
Note: ie8 (compatible mode), ie7 and ie6 can also convert strings into JSON objects using eval (), but these methods are not recommended, this method is not secure. eval executes the expression in the json string.
4> official JSON conversion method: