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

@JsonProperty annotation is being ignored over getter method #46

Closed
alocueal opened this issue Jul 5, 2017 · 2 comments
Closed

@JsonProperty annotation is being ignored over getter method #46

alocueal opened this issue Jul 5, 2017 · 2 comments

Comments

@alocueal
Copy link

alocueal commented Jul 5, 2017

Hi.
I am using Version 0.15 and this scenario happens:

I have defined a getter in this way:

@JsonGetter
public String getTest(){
return "test";
}
There is no property named "test" (it is a calculated value), but there is a getter with the annotation.

The serialization is not including a property named "test" in the serializated object if there is no property named "test".

Thank you in advance.

@monitorjbl
Copy link
Owner

monitorjbl commented Jul 5, 2017

At the moment, this library only supports field-level annotations and there is no support for method annotations. This is described in rule #10 of the README.

@monitorjbl
Copy link
Owner

Support for method-based accessors was added in 1.0.0, closing this issue for now.

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

No branches or pull requests

2 participants