Closed Raniz85 closed 7 years ago
Agreed: should improve handling (and javadocs for @JsonAnySetter
-- this was implemented via #1047 for 2.8 and javadocs were not improved).
I created
https://github.com/FasterXML/jackson-databind/issues/1458
since there's some work on databind to make this possible, not just annotations (since access from fields differs from methods).
Thank you for reporting this; hoping to implement for 2.9!
Javadocs updated to reflect actual implementation. Also note somewhat related issue #109 which allows disabling of effects of both annotations (usually using mix-in annotations).
Note that for possible additional support for field-as-any-getter, there is now this:
The documentation for JsonAnyGetter states that it can be used on fields (emphasis mine):
But the code only includes ANNOTATION_TYPE and METHOD.
@JsonAnySetter
however also includes FIELD (but doesn't mention that this is valid in the documentation).