Skip to content

JacksonMapper does not find modules needed for Java 8 #68

@EMH333

Description

@EMH333

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!

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions