1> the conversion method supported by jquery plug-in: $. parsejson (jsonstr); // jquery. parsejson (jsonstr), which can convert a JSON string to a JSON object.
2> browsers that support conversion (Firefox, chrome, opera, Safari, ie9, and IE8): JSON. p
Arse (jsonstr );
//
JSON strings can be converted into JSON objects. stringify (jsonobj); // you can convert a JSON object to a JSON string. Note: IE8 (compatible mode). IE7 and IE6 do not have JSON objects. We recommend that you use the official JSON method, introduce JSON. JS.
3> JavaScript-supported conversion methods: eval ('+ jsonstr + ')');
//
You can convert a JSON string to a JSON object. Note that a pair of parentheses must be wrapped out of the JSON character. Note: IE8 (compatible mode), IE7 and IE6 can also use eval () convert a string to a JSON object, but these methods are not recommended. Unsafe Eval will execute expressions in the JSON string.
4> official JSON conversion method: http://www.json.org/ A json.js. In this example, IE8 (compatible mode), IE7 and IE6 can support JSON objects and their stringify () and parse () methods.