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; }
时间: 2024-10-11 02:11:50