ie8 (compatibility mode), ie7 and ie6 can use eval() to convert strings to JSON objects,
1
varc='{"name":"Mike","sex":"女","age":"29"}';
2
varcToObj=eval("("+c+")");
3
alert(typeof(cToObj));
jQuery also has the method jQuery.parseJSON( json ) to convert a string to JSON format , which accepts a standard format JSON string and returns the parsed JavaScript (JSON) object. Of course, if you are interested, you can encapsulate a jQuery extension yourself. jQuery.stringifyJSON(obj) converts JSON to string.