I have a json file which has following structure:
{
"Otions": true
"Plastic": ""
"Houses": {
7: {
"name": "Akash Bhawan"
"MemBers": 3
"children": 1
}-
8: {
"name": "Ashiyana"
"memBers": 4
"children": 2
}-
9: {
"name": "Faruks Nest"
"memBers": 5
"children": 1
}-
The objects inside Houses are variable and can increase or decrease accordingly and also change names. How ever the fieds "name", "members", "children" are the only fields and will always be there
i am using gson to parse
@SerializedName("Otions")
private String Options;
@SerializedName("Plastic")
private String plastics;
@SerializedName("Houses")
private Houses houses;
i want to know if there is a way we can i can store differently named objects in a hashtable or some other way?