Closed huhlig closed 5 years ago
Usage makes sense, but I think there is already an issue in jackson-databind
where @JsonAnySetter
annotation would serve the same role:
https://github.com/FasterXML/jackson-databind/issues/562
which I think might do what you want? (if it gets implemented)
Hadn't seen that one but it makes sense and would do what I'm looking for. Although given that it's 3 years old what's the likelihood of it being implemented?
@huhlig Fair point, but I think chances are better than age would suggest mostly because:
But someone still needs to work on it: it's not trivial to implement: not necessarily difficult, but lots of work to pipe things through.
Oh and the reason (1) matters (3.0) is that the whole Creator method handling code really could use a rewrite, and this change would benefit from rewrite.
Alright, I've closed this out and commented on the other ticket.
Request to create a new Annotation called @JsonFallback to handle any unknown fields in a property based Constructor. This allows for the normal usage of a property constructor and strong typing but also allows for final classes to be constructed with "additional" unbound fields. This could be useful with a String/Object, String/String Map or similar.