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
[BUG] Jackson annotation @JsonProperty not working with @Jacksonized #2824
Comments
I'm quite sure this has been fixed in the meantime. Can you confirm that this does not work with Lombok 1.18.22? |
yep, I'm using this version |
same here |
I just checked again, and cannot reproduce. Your example works for me both in Eclipse and javac (via maven compile). |
I am. But I circunvented the issue by renaming the field instead of using |
Yes, it could be an IntelliJ IDEA issue. Try building with maven/gradle/whatever you use and check whether the problem persists. (If it does, it's a lombok issue, if not, it's on IntelliJ.) |
I think @janrieke has it right. Without feedback, this can be closed 2022-04-01. |
Same problem for me (1.18.24). Also using Intellij. |
Make sure that all the jackson annotations are imported from the |
@nucatus |
seems fixed then. |
Describe the bug
If you use the @JsonProperty annotation on a field to provide a property name that differs from the field name, it does not work. This is with Lombok 1.8.2
To Reproduce
Here is a sample class and a unit test that fails:
Here is the error I get:
When I look at the generated code, the Builder does not have any Jackson annotations on it:
Expected behavior
Attaching @JsonProperty to a field should be honored using @Jacksonized with
@Value
Version info (please complete the following information):
The text was updated successfully, but these errors were encountered: