Parse nested json into flat model class objects
- Dominant language
- Java
- Stars
- 24.2k
- Forks
- 4.5k
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 12
Description
# Problem solved by the feature
No need of creating nested classes according to the json file.
# Feature description
if i have a nested json like :
{ id : 1 ,
name : "myname" ,
address : {
street : "my lane" ,
city : "mycity" }
}
I want to parse this json into target model class but cannot parse without creating nested class 'address' inside my target class.
There should be a method to write like @Serialized("address.street") in model class field which automatically get the nested street value from address so that i do not need to create a nested class in order to parse this json into object .
Target model class will be Model> id, name, street, city
# Alternatives / workarounds
alternative is simply create nested class Model> id , name, Address> street, city
Contributor guide
Assessment
This issue has not been assessed yet.