如何使用Google Json解析以下回复?
{
"code": 1,
"data": {
"0": {
"name": "test",
"expirationDate": "-1",
"masterDate": "31\/5\/2013",
},
"message": "my message"
}
}
我试过这个....
public class Test {
public int code;
public Data data;
public class Data {
@SerializedName("0")
public Promo customName;
}
public class Promo {
public String name;
public String expirationDate;
public String masterDate;
}
它不起作用......帮帮我
答案 0 :(得分:0)
您的Data
班级缺少message
变量:
public class Data {
@SerializedName("0")
public Promo customName;
public String message;
}