Closed mpkorstanje closed 9 months ago
Contributing - Paper Work All you need to do is to download the CLA document, print it, fill and sign, scan (or take photo on your phone) and email that copy to info at fasterxml dot com.
Please hold one moment while I print liquid gold on dead tree.
Ok: as per my comments, I'd like to use a module configuration setting here.
But looking at the way deserializers are implemented, this appears a bit tricky: not so much wrt configuring JavaTimeModule
, but in passing configuration setting(s) from module to InstantDeserializer
... some refactoring would be needed, so that instead of pre-created instances, we'd create instances when registering deserializers.
Alas, InstantDeserializer.INSTANT
and 2 others are public static
singletons so we must leave something like that.
Let me think about this a bit.
Ok, I found time to implement #281, and for that introduced JavaTimeFeature
enumeration -- this now allows adding a setting for this PR as well. The main/only concern for me is just naming the feature to reflect semantics.
Cool. I'll rework the PR to use that.
Looks like I got CLA too, great!
@mpkorstanje I renamed the feature, made some other minor tweaks and so I think this is ready for merge from my POV. But I wanted to let you have a look if you want some other changes (even better feature name? :) ) Just LMK either way, looking forward to getting this nice feature merged.
Sorry for the delay. Yesterday was a bit full.
Naming aside, it looks good to me.
Thank you for all the work here & improvement suggestions @mpkorstanje !
There is an apparent inconsistency in the way Jackson de-serializes numbers that are shaped as a string into an instant.
There is however no way to construct a pattern that handles both ISO dates and epoch milis/nanos. This feature toggle allow numeric strings to be read as numeric timestamps.
Fixes: https://github.com/FasterXML/jackson-modules-java8/issues/263.
This PR is paired with https://github.com/FasterXML/jackson-databind/pull/3830.