Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1542751
  • 博文数量: 237
  • 博客积分: 5139
  • 博客等级: 大校
  • 技术积分: 2751
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-18 14:48
文章分类

全部博文(237)

文章存档

2016年(1)

2012年(4)

2011年(120)

2010年(36)

2009年(64)

2008年(12)

分类: Java

2011-08-26 16:26:04


JSONObject is an unordered collection of name/value pairs. Its external form is a string wrapped in curly braces (花括号)with colons(冒号) between the names and values, and commas(逗号) between the values and names. The internal form is an object having get() and opt() methods for accessing the values by name, and put() methods for adding or replacing values by name. The values can be any of these types: Boolean, JSONArray, JSONObject,Number, and String, or the JSONObject.NULL object.

eg. 一个Jason object:
jason_object_1 = {"account":"Li","Device":"iphone","path":"c:\\"}

JSONArray is an ordered sequence of values. Its external form is a string wrapped in square brackets(方括号) with commas(逗号) between the values. The internal form is an object having get() and opt() methods for accessing the values by index, and put() methods for adding or replacing values. The values can be any of these types: Boolean, JSONArray, JSONObject, Number, and String, or the JSONObject.NULL object.

eg. 一个jasonArray:
["string",jason_object_1]

The JSONString is an interface that allows classes to implement their JSON serialization.


阅读(1347) | 评论(0) | 转发(0) |
0

上一篇:MD5的作用

下一篇:Ubuntu上安装谷歌输入法

给主人留下些什么吧!~~