JSON的使用

时间:2014-05-26 03:45:00   收藏:0   阅读:260

服务器端:

Person person = new Person(  ,    ,);
JSONObject obj = new JSONObject();
obj.put("person", person);

Android 客户端:

JSONObject jsonObject = new JSONObject(jsonString);
			JSONObject personObject = jsonObject.getJSONObject("person");
			person.setId(personObject.getInt("id"));
			person.setName(personObject.getString("name"));




JSON的使用,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!