码迷,mamicode.com
首页 > 移动开发 > 详细

android fastjson 解析

时间:2015-07-17 18:17:23      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:

JSONObject jsonObject = JSON.parseObject(wsResponse);
String recommends = jsonObject.getString("recommends");

Log.i("ss","__________________________recommends:"+recommends);
List<Recommend> contents = JSON.parseArray(recommends, Recommend.class);
Log.i("ss","____________________________contents.size:"+contents.size());

注意:
1:是Integer不是int

2:是implements Serializable,不是implements Serializable, Parcelable
public class Recommend implements Serializable {

private Integer mediaId;
private String title;
private Integer timeSpan;
private Integer roomId;
private String roomName;
private Integer gameId;
private Float overallScore;
private Integer scoreType;
private Integer totalViews;
private Integer definition;
private String createTime;

}

android fastjson 解析

标签:

原文地址:http://www.cnblogs.com/wanqieddy/p/4655032.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!