Skip to content

support for nested items in @JsonKey(name:) #490

Closed
@KorbinianMossandl

Description

@KorbinianMossandl

It would be great if we could directly access nested items in the name String of @JsonKey. Consider this Json:

"root_item": {
    "items": [
        {
            "name": "first nested item"
        },
        {
            "name": "second nested item"
        }
    ]
}

I would like to do:

@JsonKey(name: "root_item/items")
List<NestedItem> nestedItems;

Sorry if this is already possible, but i could not find anything.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions