Add mapper feature to allow explicitly named properties to be renamed with PropertyNamingStrategy#918
Conversation
… with PropertyNamingStrategy
|
If accepted, it would be great if this could make into a 2.6.x release (assuming 2.7 is further out?) I'm also happy to update any docs if someone points me to the right place. |
|
Looks good to me. Unfortunately it can not be added in 2.6, since it is addition to API, which is something patch releases should not do (because it'd mean that patches are not fully API compatible etc -- but this is just a rule we follow), but makes sense for 2.7. So, I'd be happy to merge this contribution. One practical thing we will need now is the Contributor License Agreement (from https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf). Looking forward to merging this feature! |
|
No problem regarding 2.7. I have e-mailed the signed agreement. Thanks! |
|
Looks good to me, CLA received, merging. |
Add mapper feature to allow explicitly named properties to be renamed with PropertyNamingStrategy
|
Beautiful. It also gave me an idea of a follow-up feature to perhaps implement; will file the issue next, link to this one. |
|
So, #926 is for adding property in |
The fix for [#428] made a change to prevent explicitly named properties (ones that have
JsonProperty("explicitName")for example) from being renamed by a configuredPropertyNamingStrategy, however sometimes this behavior may be desirable.This simple change adds a mapper feature (disabled by default of course) that allows this behavior.