Closed tbeech closed 6 years ago
Would @JsonAlias
from 2.9 work?
Let me RTFM the docs for that annotation, but I would guess that it would do exactly what I’m looking for. Thank you!
@tbeech Np, hope it works out -- brief overview of 2.9 at:
https://medium.com/@cowtowncoder/jackson-2-9-features-b2a19029e9ff
and @JsonAlias
is definitely something that was high on most-wanted list.
Alternative would have been to extend @JsonProperty
just like you suggested.
Often times when developing against a data model that may change (whether third party API or your own application models) where backwards compatibility is needed it would be nice to use the builder pattern to support multiple properties that map to the same internal field.