Instants get not deserialized as expected sometimes (millis vs nanos, non-fractional numbers)
まだ誰も着手していません。
評価
調査の方向性
まず READ_DATE_TIMESTAMPS_AS_NANOSECONDS と WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS の処理箇所を特定し、次にミリ秒値 1709296652087 のデシリアライズを再現してください。整数のタイムスタンプが小数値とどのように区別されるかを確認し、提案されたオプションを実装またはテストする前に、秒、ミリ秒、マイクロ秒、ナノ秒について期待する動作を定義してください。
索引モデルが issue の本文から書いたものです。
説明
Hey guys,
I bumped into this issue and it took me some time to figure out what was wrong on my side.
Maybe you don't even consider this as an issue but let me explain first what happened on my side.
When having the flag disabled for WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS
It will eventually write timestamps in Milliseconds:
1709296652087
When I now missed the flag READ_DATE_TIMESTAMPS_AS_NANOSECONDS
and read this we will get an insane Instant consisting of:
Seconds 1709296652087
and
Nanos 0
Using any site online it would understand and consider it as a Milliseconds timestamp.
I guess usually you would just split up a timestamp with a dot and put it to Seconds and Nanos, but I think theoretically both should be possible.
So do you think we could have a feature where we parse values based on their length?
11 characters or less = Seconds
12 to 15 characters = Millis
16 to 18 characters = Micros
19 to 21 characters = Nanos
While writing I am realizing that this might feel less consistent but I also think this might be an interesting flag to add,
you be the judge.
- 主要言語
- Java
- スター
- 425
- フォーク
- 125
- 平均マージ
- 19分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
FasterXML/jackson-modules-java8 のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
FasterXML/jackson-modules-java8#382 · コメント 3 件 ·
-
date-time-config
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
FasterXML/jackson-modules-java8#374 · コメント 31 件 · リアクション 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
FasterXML/jackson-modules-java8#310 · コメント 1 件 ·
-
pr-welcome test-needed
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
FasterXML/jackson-modules-java8#299 · コメント 4 件 · リアクション 1 件 ·
FasterXML/jackson-modules-java8 の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
elastic/gradle-plugins#157 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cryptomator/hub#497 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
johanhaleby/occurrent#1120 ·