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

Fix snake case deserialization #189

Draft
wants to merge 3 commits into
base: 2.19
Choose a base branch
from

Conversation

juulhobert
Copy link

Issue: #176

juulhobert and others added 3 commits January 10, 2025 22:08
@cowtowncoder
Copy link
Member

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 cla at fasterxml dot com.

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>
Copy link
Member

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.

Copy link
Author

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(
Copy link
Member

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>
Copy link
Member

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.

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