JSON.parse 与 JSON.stringify
(function($){ var obj = { "title":"jsonparse", "time":new Date().getTime() }; var arr = [{"title":"jsonarr"},{"time":new Date().getTime()}]; console.log(typeof(obj)); console.log($.isArray(obj)); console.log($.isPlainObject(obj)); console.log(JSON.stringify(obj)); var str = JSON.stringify(obj); console.log("json parse:" + JSON.parse(str)); console.log(typeof(arr)); console.log($.isArray(arr)); console.log($.isPlainObject(arr)); console.log(JSON.stringify(arr)); var strarr = JSON.stringify(arr); console.log("json parse:" + JSON.parse(strarr)); })(jQuery);