Skip to content

jackson-module-parameter-names: @JsonPropertyName still required if @JsonDeserialize is used  #178

@clo-vis

Description

@clo-vis

If ParameterNamesModule is registered, { "a": 1, "b": 1 } can be deserialized to an instance of:

public class Foo{
     public Foo(int a, int b) { }
}

but not to an instance of:

public class Foo{
    public Foo(@JsonDeserialize(converter=Incr.class) int a, int b) { }
}

unless you declare the property name again:

public class Foo{
     public Foo(@JsonDeserialize(converter=Incr.class)@JsonProperty("a") int a, int b) { }
}

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