Closed mjustin closed 3 years ago
Sounds reasonable: if anyone has time, PR (against branch 2.12, I think) would be very welcome.
Unfortunately javadocs mostly get updated when code changes, but in case of annotations code mostly changes in jackson-databind
and annotations themselves are not modified, just their applicability.
The Stack Overflow question What's the Jackson deserialization equivalent of @JsonUnwrapped? currently has 52 upvotes. It is therefore clear that users are surprised to find that
@JsonUnwrapped
also applies to deserialization.A prime source of this confusion appears to be the fact that the documentation for
@JsonUnwrapped
does not mention deserialization at all:Other annotations that apply to both serialization & deserialization call this out in the documentation, including
@JsonIgnoreProperties
,@JsonIgnoreProperties
, &@JsonView
.It seems therefore that it would be helpful if the Javadocs mentioned that the annotation applies to deserialization as well as serialization.