-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
Currently the Jackson provider does not include the Jdk8Module, JavaTimeModule and JakartaXmlBindAnnotationModule to the ObjectMapper by default. In some cases this is not an issue because older versions of Jackson will serialize objects. However, the serialized result could be considered odd. For example when serializing a java.util.Optional without the Jdk8Module results in:
{"empty":false,"present":true}
The value itself would be rendered if the module is present.
In newer releases of Jackson without the Jdk8Module an exception would be thrown. This may be related tohttps://github.com/FasterXML/jackson-modules-java8/issues/294.
While this behavior should not be back ported to 6.2, it seems reasonable to include in 7.0 as it's not yet final. User should still be able to override a ObjectMapper provider. It is likely a good idea to simply use the new ObjectMapper().findAndRegisterModules() by default.
Note that when integrated into WildFly we will need to update the documentation https://docs.wildfly.org/32/Developer_Guide.html#custom-objectmapper.
- relates to
-
WFLY-19298 Upgrade fasterxml to 2.17.0
-
- Pull Request Sent
-