-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fix snake case deserialization #189
base: 2.19
Are you sure you want to change the base?
Fix snake case deserialization #189
Conversation
Fix deserialization of record classes with snake_case field names annotated with `@JsonProperty`.
… then make it pretty)
First of all, thank you @juulhobert for working on this! I know it's a draft and may take some time. Eventually if all goes well, we'll need CLA (assuming you haven't sent one earlier): only needs to be done once (good for all future contributions) It's here: https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf and is usually printed, filled & signed, photo/scanned, emailed to But this is only need to merge, just mentioning it now. Will also have a look at changes now. |
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>16</source> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is just for testing -- Jackson 2.x is JDK 8, still.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking a look at this draft PR. I appreciate the time and effort you invest in this open-source project :) The code in this PR still needs some refinement. I already expected that changing the JDK version is not wishful. This is just the first draft, where I focused on getting the functionality to work and gaining a better understanding of the library's internals.
Can I ask you a question about the RecordsHelper class? I've changed the visibility from default to public to use it in the AnnotationBasedIntrosepector class. I'm not sure if this change is appropriate. What do you think?
@@ -34,6 +35,11 @@ public String getMiddle() { | |||
public void setLast(String str) { last = str; } | |||
} | |||
|
|||
record SnakeCaseRecord( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot be done here, as it requires JDK beyond 8. Any Record tests need to go in separate jr-record-test
Maven sub-project.
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>16</source> | ||
<target>16</target> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also not acceptable. Only "jr-record-test" can rely on later JDK than 8.
Issue: #176