GulajavaMinistudio / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

Can we have feature to access child directly using SerializedName? #638

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It will be better  if I can access chile object directly using SerializedName 
so I don't have to make wrapper like this problem, 
source:http://stackoverflow.com/questions/12029367/parsing-json-using-google-gso
n-reading-values-directly-from-child-objects

JSON:
{"Name":
    {"object1":   
       {"field1":"17",
        "field2":"360",
        "field3":"19",
        "field4":"sun",
        "field5":"rain"
       }
    }
}

intended use/ ideally usage:

@SerializedName("Name/object1/field1")
public int fieldOne;

or

@SerializedName("Name.object1.field1")
public int fieldOne;

Original issue reported on code.google.com by nucleus...@gmail.com on 24 Apr 2015 at 5:15