其中Bean为:
public class Item {
private String id; //id
private String name; //名称
private String url; //分类网页链接
private String desc; //分类描述
private Integer type; //类型类别 1:应用 2:游戏
private Integer pid; //上机分类ID,为空时为顶级分类
private String count; //分类应用数量
private String icon; //图标地址
}
Json的数据格式是:
{"result":{"count":18,"items":[{"item":{"id":"1","name":"应用","url":"http://www.eoeet.com/categories/1","desc":"Application","type":1,"pid":null,"count":"14344","icon":"http://c11.eoeet.com/images/icons/apps/all.png"}}]}}
这种格式的Type 怎么写
Type type = new TypeToken<??????>() { }.getType();
求高手解答
public class Item {
private String id; //id
private String name; //名称
private String url; //分类网页链接
private String desc; //分类描述
private Integer type; //类型类别 1:应用 2:游戏
private Integer pid; //上机分类ID,为空时为顶级分类
private String count; //分类应用数量
private String icon; //图标地址
}
Json的数据格式是:
{"result":{"count":18,"items":[{"item":{"id":"1","name":"应用","url":"http://www.eoeet.com/categories/1","desc":"Application","type":1,"pid":null,"count":"14344","icon":"http://c11.eoeet.com/images/icons/apps/all.png"}}]}}
这种格式的Type 怎么写
Type type = new TypeToken<??????>() { }.getType();
求高手解答
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货