You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is possible to allow coercion from JSON Empty String into POJOs that have "default" (aka "no-arg" or "0-arg") Creator (constructor of rfactory method). But it is not possible to use "properties"-style Creator like:
class Pojo {
protected int a, b;
@JsonCreator(mode = Mode.PROPERTIES)
public Pojo(@JsonProperty("a") int a, @JsonProperty("b") int b) {
this.a = a;
this.b = b;
}
}
as deserialization only wants to use default creator.
But we could actually use Properties-passing one (if one exists). Let's allow this.
NOTE: this is most useful for XML use case.
The text was updated successfully, but these errors were encountered:
cowtowncoder
changed the title
Allow use of @JsonCreator(mode = Mode.PROPERTIES) creator for POJOs for "empty String" coercion
Allow use of @JsonCreator(mode = Mode.PROPERTIES) creator for POJOs with "empty String" coercion
Nov 21, 2022
(note: offshoot of FasterXML/jackson-dataformat-xml#547)
Currently it is possible to allow coercion from JSON Empty String into POJOs that have "default" (aka "no-arg" or "0-arg") Creator (constructor of rfactory method). But it is not possible to use "properties"-style Creator like:
as deserialization only wants to use default creator.
But we could actually use Properties-passing one (if one exists). Let's allow this.
NOTE: this is most useful for XML use case.
The text was updated successfully, but these errors were encountered: