var data = { json: $.toJSON({ text: 'some text', array: [1, 2, 'three'], object: { par1: 'another text', par2: [3, 2, 'one'], par3: {} } }), delay: 3}$.ajax({ url:"/echo/json/", data:data, type:"POST", success:function(response) { console.log(response); }});现场演示
注意我添加了一个额外的资源.. jquery-json
在View上使用FireBug控制台进行演示
(无需拉起开发人员控制台即可看到收益)



