Below is my json response
{
"name": "Vikram",
"test:content" :{
"test:title" : "school",
"main" : {
"test:label" : "value",
"container": {
"test:class" : "10th",
"Details" : {
"parentdetails" : ["some value"],
}
}
}
}
}`
I am able to retrieve data for name with below format but how to get data of "parentdetails". Is there a way to retrieve data using JsonObject from Gson?If so, how to do it?
Object obj = jsonParser.parse(reader);
JSONObject stu = (JSONObject) obj;
String text = (String) stu.get("name");