<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
function stringToJson(stringValue) {
eval("var theJsonValue = " + stringValue);
return theJsonValue;
}
onload = function () {
var str = "{name:'周小将',age:22}";
var strToJson = stringToJson(str);
alert(typeof strToJson);
alert(strToJson.name);
};
</script>
</head>
<body>
</body>
</html>