jackson-databind
jackson-databind copied to clipboard
Serialize to multiple aliases
I have an API that is read by an existing client, and I would like to rename a field on the API. I want to serialize the value under both the new name and the previous name so that existing clients will continue to work while they are migrated to use the new field name. This is simple enough to do by adding an additional getter with the new name; however, I wonder if a @JsonAlias-style approach would be worth adding to Jackson to do this automagically (@JsonAlias only works for deserialization).
Related issue: #1029 (aliases for deserialization)