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

JacksonMapper does not find modules needed for Java 8 #68

Closed
EMH333 opened this issue Apr 19, 2018 · 5 comments
Closed

JacksonMapper does not find modules needed for Java 8 #68

EMH333 opened this issue Apr 19, 2018 · 5 comments
Assignees
Milestone

Comments

@EMH333
Copy link

EMH333 commented Apr 19, 2018

When using Jackson you need a couple extra modules for in order to use any features like java.time.LocalDateTime. When I add those module dependencies to my project, JacksonMapper does not find them/use them. I can override JacksonMapper and create my own mapping class, that can include those modules, that works just fine. However, it would be nice to include them automatically.
The object mapper for Jackson appears to have a method titled, "findAndRegisterModules" which in my testing, finds all Jackson modules and includes them. Could this be the default for JacksonMapper? That way when wanting to use Java 8 time functions, all a user has to do is include the extra modules with dependency management of their choice and not extend JacksonMapper, which is more complex and has more potential for them to make mistakes(?).
I saw similar issues (#51 and #59 ) however those are dealing with Kotlin and did not appear to carry over to Java.
I would open a pull request, but I am still learning how to contribute on GitHub and wouldn't want to mess anything up. Many thanks!

@anidotnet anidotnet added this to the 3.0.1 milestone Apr 20, 2018
@anidotnet
Copy link
Contributor

No worries. Please go ahead and create a pull request if you are willing, I'll be more than glad for your contribution. Please don't forget to add sufficient test cases also.

Before merging all pull requests in github go through a manual review, so no chance of messing things up 😄.

@anidotnet
Copy link
Contributor

Let me know if you are willing to give the PR.

@EMH333
Copy link
Author

EMH333 commented Apr 23, 2018

Oops, though I replied but apparently not. At this point, even though it is going to only be one line of code and then a few tests (although I can't think of any), I don't think it makes sense for me to make the changes (it is slightly out of my comfort zone). If you really feel like it would be too much work the I can but this is really more of a want then a need. Thank you for this awesome project, I really see how useful it can be!

@anidotnet
Copy link
Contributor

No issues, I'll make the necessary changes then.

If you like this project, please do spread the word 😄

@anidotnet anidotnet self-assigned this Apr 23, 2018
@anidotnet
Copy link
Contributor

@EMH333 you can find this feature in the latest snapshot - 3.0.1-SNAPSHOT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants