I have the following json string:
[
{
"question" : {
"questionId" : 1109,
"courseId" : 419
},
"tags" : ["PPAP", "testtest"],
"choices" : [{
"choiceId" : 0,
"questionId" : 0
}, {
"choiceId" : 0,
"questionId" : 0
}
]
}
]
How do I make question, tags, and choices into separate objects using GSON? Currently I only use fromJson
and can only convert a JSON string if it only contains 1 type of object.