Open fbacchella opened 4 months ago
Due to this module being changed over time by bunch of different contributors, without clear owner (after initial version), there are indeed many inconsistencies. But because of (backwards-)compatibility limitations changes need to be done carefully and incrementally.
Given above, this issue is not quite something that can be worked as-is, since its scope is wider than what individual PRs could tackle. It'd be great to create a set of "smaller" issues instead, ones that focused on one specific date/time type or configuration feature.
To solve that problem, I have written a dedicated module(https://github.com/fbacchella/LogHub/blob/no_axibase/loghub-core/src/main/java/com/axibase/date/JacksonModule.java). By loading it after the JavaTimeModule, it hides the problematic serializers.
@fbacchella Thank you for sharing this.
I’m comparing results of different time object serialization with different settings and the result are very different.
I wrote the following code
The output is
I don’t think the output should depend of the class used, except for the precision. And many are plain wrong, where many features are not really applied. For example with
WRITE_DATES_WITH_CONTEXT_TIME_ZONE
, even Instant should not be serialized az UTC, but indeed with the context time zone.