Open
Description
When using @JsonProperty(required = true)
with creator/factory (@JsonCreator
annotation), an exception is raised if a required field is missing (as expected).
It is possible to have the same feature when using a builder to deserialize?
Sorry if this request is duplicate or already present, but I couldn't find it at issues list, forum, neither as configuration on the ObjectMapper documentation.
Tested with Jackson version 2.10.2, using the following code:
@JsonDeserialize(builder = Person.Builder.class)
public class Person {
@JsonProperty(required = true)
private final String name;
...
public static class Builder {
public Builder withName(String value) {...}
public Person build() {...}
}
}