How do we
flatten a
JSON with
nested elements into a
single class? E.g. I’ve to following OSM data that I need to have in just one class, without creating a subclass for `tags`:
{
"type": "node",
"id": 66917229,
"lat": 52.5167295,
"lon": 13.3797732,
"tags": {
"addr:city": "Berlin",
"addr:housenumber": "4a",
"addr:postcode": "10117",
"addr:street": "Pariser Platz",
"amenity": "cafe",
"brand": "Starbucks",
"name": "Starbucks",
"website": "<https://www.starbucks.de/store-locator/store/2099/pariser-platz-pariser-platz-4-a-berlin-be-10117-de>",
"wheelchair": "yes",
"wifi": "free"
}
}
I am using custom Serializer but I’m a bit lost on how to unwrap the nested values in the
deserialize
function for the nested tags element. Any help is highly appreciated.