I need help to parse this JSON, i have some problems.
- The object name is "random"
- I need to create Java object with list of generic objects and parse Json
- How i can parse every object with random object name.
The Json to Parse example 1 :
{
"object_name_1":{
"id":0,
"value_1":"hello",
"value_2":"test",
},
"object_name_2":{
"id":1,
"value_1":"hello",
"value_2":"test",
},"object_name_3":{
"id":2,
"value_1":"hello",
"value_2":"test",
}
}
The Json to Parse example 2 :
{
"test_object":{
"id":0,
"value_1":"hello",
"value_2":"test",
},
"object_name_2":{
"id":1,
"value_1":"hello",
"value_2":"test",
},
"new_object":{
"id":2,
"value_1":"hello",
"value_2":"test",
}
}
- NB: This is a JSON Object not Json Array and i have output from API so i can't change Json Output
Thank you.