【发布时间】:2018-01-17 06:58:28
【问题描述】:
我收到了来自 api 的以下响应 我必须得到这样的回应:
@SerializedName("AllQuestions")
public List<AllQuestions> AllQuestions;
我有 AllQuestion 数组,但现在如何进入 pojo 类中的多个列表数组
"AllQuestions": [
[
{
"QuestionID": "1",
"QuestionText": "What was the name of your elementary/primary school?"
},
{
"QuestionID": "2",
"QuestionText": "What was your childhood nickname?"
}
],
[
{
"QuestionID": "11",
"QuestionText": "What was your favorite sport in high school?"
},
{
"QuestionID": "12",
"QuestionText": "What was the name of the hospital where you born?"
}
],
[
{
"QuestionID": "21",
"QuestionText": "Where were you when you had your first kiss?"
},
{
"QuestionID": "22",
"QuestionText": "What are the last 4 digits of your driving license?"
},
]
]
AllQuestion.java(POJO 类)
@SerializedName("QuestionID")
public String QuestionID;
@SerializedName("QuestionText")
public String QuestionText;
【问题讨论】:
标签: android arraylist retrofit2 pojo