Skip to content

Allow use of JsonNode field for @JsonAnySetter #3394

Closed
@sixcorners

Description

@sixcorners

Is your feature request related to a problem? Please describe.
When working with unmapped nodes I want to work with JsonNode instead of Map.

Describe the solution you'd like
I want JsonAnySetter to support a field of the type JsonNode or maybe ObjectNode.

Usage example
class Test {
@JsonAnySetter
JsonNode extraData;
}
mapper.readValue("{"test": 3}", Test.class).extraData.path("test").intValue() == 3

Additional context
I'm a big fan of JsonNode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions