FasterXML / FasterXML/jackson-modules-java8

java9+ OffsetDateTimeSerializer/OffsetDateTimeDeserializer miliseconds instead of nano config

オープン
#161 コメント 8 件 リアクション 5 件 担当者 1 名 @kupci が担当を希望しています GitHub で見る
主要言語
Java
スター
425
フォーク
124
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi,
we have set `SerializationFeature.WRITE_DATES_AS_TIMESTAMPS` to `false` and in java8 it wrote time in milliseconds precision (java worked this way for a long time).
After migrating to java11 the precision is nanoseconds
* (Java 8- - 2020-01-28T16:31:37.698+01:00)
* (Java 9+ - 2020-01-28T16:31:37.698185+01:00)

This is fine, but unfortunately the services both northbound and southbound of our system can work with milliseconds (3 digits).
Would it be possible to create a `SerializationFeature` to enable java8 behavior meaning serializing only to milliseconds precision?
We use a spring boot autoconfiguration where we would like to set this globally for all of our microservices.

Thanks,
Ondrej

PS: Maybe until then, could you provide us instructions for the best way to setup this in Spring Boot 2.2.x?
Thanks

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。