I’ve a simple question, and was wondering if someone here could help me how to parse through a Json string and extract all the User and put it into a List?
Note the object key directly under Users is a random number which can change with every response!
{
"_links": {},
"count": {},
"users": {
"123321": { //*Is a random number which can be any number
"_links": {},
"user": {
"id": "123321",
"name": "...",
"age": "...",
"address": ""
..
}
},
"456654": {
"_links": {},
"user": {
"id": "456654",
"name": "...",
"age": "...",
"address": ""
...
}
}
...
},
"page": {}
}
Ideally, it would be nice to utilize Jackson Json or Gson.
Also I would like to only construct User object with two fields (id & name) and ignore the rest of the fields!
usersmember.