Recommend this page to a friend! |
Classes of Julian Finkler | JSON Object Mapper | doc/2_mapping_with_typehints.md | Download |
|
DownloadMapping Data with TypehintsThe object mapper can also map nested data. For example you have in your JSON a property which contains a address for the user:
Your user and address object looks like this
If you map the json to this user object, the address property would become an array - but we want an instance of Address. In this case you need to modify the annotation of the
With this, the |