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.
I assume this is just for testing -- Jackson 2.x is JDK 8, still.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
@juulhobert Thanks! Apologies for slow follow up (was on vacation for a week).
So: yes, changing it to public is ok if (when) it is necessary.
| public void setLast(String str) { last = str; } | ||
| } | ||
|
|
||
| record SnakeCaseRecord( |
There was a problem hiding this comment.
Cannot be done here, as it requires JDK beyond 8. Any Record tests need to go in separate jr-record-test Maven sub-project.
(which exists for purpose of hosting Record-tests)
| <artifactId>maven-compiler-plugin</artifactId> | ||
| <configuration> | ||
| <source>16</source> | ||
| <target>16</target> |
There was a problem hiding this comment.
Also not acceptable. Only "jr-record-test" can rely on later JDK than 8.
Issue: #176