Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Jackson field-renames-getter heuristic #461

Closed
wants to merge 2 commits into from
Closed

Support for Jackson field-renames-getter heuristic #461

wants to merge 2 commits into from

Conversation

julesfern
Copy link

Jackson supports the following behaviour:

public class Foo {
    @JsonProperty("renamed") private String foo;
    public String getFoo() { return foo; }    
}

When rendering JSON with Jackson, the getFoo method will correctly be interpreted as belonging to the marshalled "renamed" property.

Although support for @JsonProperty and @JsonIgnore were added in #321, the model parser was not respecting renames found at the field level after inspecting a corresponding public getter method. This patch is a fix.

Apologies if any of the code is horribly naive - totally open to receiving feedback and making this PR better.

@fehguy
Copy link
Contributor

fehguy commented Mar 19, 2014

Hi, this was merged in #486

@fehguy fehguy closed this Mar 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants