0
我有一個JSON響應,如下所示。我正在嘗試爲此創建一個POJO,以便將此JSON序列化到我的POJO中。將json序列化爲pojo類
{
"holder": [
{
"ids": [
{
"data": "abcdef1234",
"time": 1452720139465,
"days": 16813
},
{
"data": "abcdef12345678",
"time": 1452720139465,
"days": 16813
},
{
"data": "abcdef123456789",
"time": 1452720139465,
"days": 16813
}
],
"type": "HELLO"
}
]
}
這是我的POJO我能夠想出,但它看起來不正確。
public class TestResponse {
private List<Ids> holder;
private String type;
// getters and setters
public static class Ids {
private String data;
private long time;
private long days;
// getters and setters
}
}
我的JSON是沒有得到連載到我上面的POJO
你試過了什麼代碼?請它也是 –