You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should set useBigDecimals = true in the jsonSchema2Pojo gradle config.
Presently, the protocol defines fields which are oddly of type number:
emitted_at in TRACE and CONTROL messages
record_count
The emitted_at field is always a millisecond epoch timestamp. In Java, the jackson library will always serialize double and float values using scientific notation, which can cause loss of precision in the least significant digits, yet these are precisely those which are interesting to the user here.
The record_count was deliberately picked to be a double though the reason isn't immediately obvious, a long should be quite sufficient.
In any case, the values are always integers and not terribly huge ones either, they should be perfectly safe to represent using BigDecimal.
This change is not backward-compatible, but perhaps that's not that big of a deal? I don't know.
The text was updated successfully, but these errors were encountered:
We should set
useBigDecimals = true
in the jsonSchema2Pojo gradle config.Presently, the protocol defines fields which are oddly of type
number
:emitted_at
in TRACE and CONTROL messagesrecord_count
The
emitted_at
field is always a millisecond epoch timestamp. In Java, the jackson library will always serializedouble
andfloat
values using scientific notation, which can cause loss of precision in the least significant digits, yet these are precisely those which are interesting to the user here.The
record_count
was deliberately picked to be adouble
though the reason isn't immediately obvious, along
should be quite sufficient.In any case, the values are always integers and not terribly huge ones either, they should be perfectly safe to represent using
BigDecimal
.This change is not backward-compatible, but perhaps that's not that big of a deal? I don't know.
The text was updated successfully, but these errors were encountered: