json [] {}

来源:互联网 发布:数据库更改sql语句大全 编辑:程序博客网 时间:2024/05/16 07:17
本文转自http://www.cnblogs.com/mqingqing123/archive/2011/03/11/1981651.html
在 JSON 里 [] 是 Array {} 是Ojbect[] Array 的key 是 int.{} 的key 是 stringvar a= Array();a[a.length] = '3';a[a.length] = '4';a[a.length] = '5';a toJSON 后 ='["3", "4", "5"]'var a = new Object();a['test1'] = '3';a['test2'] = '4';a['test3'] = '5';a toJSON 后 = '{"test1":"3", "test2":"4", "test3":"5"}' 

0 0
原创粉丝点击