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
Is your feature request related to a problem? Please describe.
Since @JsonAnySetter can be used in fields, I think it would make sense to also allow @JsonAnyGetter to be used in fields whose type is java.util.Map. I fail to see why it shouldn't be able to be used in fields just like @JsonAnySetter is. Considering @JsonAnyGetter only requires the method return type to be java.util.Map, it seems that it's quite intuitive to be able to annotate a field with it.
Describe the solution you'd like
To allow @JsonAnyGetter to be used in fields as well as methods returning java.util.Map.
Additional context
Opening this more as a request for comments. I might be able to implement this and submit a PR on a later date, if the idea gets approval.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Since
@JsonAnySetter
can be used in fields, I think it would make sense to also allow@JsonAnyGetter
to be used in fields whose type isjava.util.Map
. I fail to see why it shouldn't be able to be used in fields just like@JsonAnySetter
is. Considering@JsonAnyGetter
only requires the method return type to bejava.util.Map
, it seems that it's quite intuitive to be able to annotate a field with it.Describe the solution you'd like
To allow
@JsonAnyGetter
to be used in fields as well as methods returningjava.util.Map
.Usage example
Something like this:
could become:
Additional context
Opening this more as a request for comments. I might be able to implement this and submit a PR on a later date, if the idea gets approval.
The text was updated successfully, but these errors were encountered: