Closed sndmn1 closed 1 year ago
MessagePack format can't represent the precision. Please follow this https://github.com/msgpack/msgpack-java/blob/develop/msgpack-jackson/README.md#serialize-and-deserialize-bigdecimal-as-str-type-internally-in-messagepack-format
@komamitsu, thanks for the suggestion. This has resolved our issue.
@sndmn1 We added a new API to easily enable to handle BigDecimal value in String as follows
ObjectMapper objectMapper = new MessagePackMapper().handleBigDecimalAsString();
This feature has been released as 0.9.4.
See https://github.com/msgpack/msgpack-java/tree/develop/msgpack-jackson#serialize-and-deserialize-bigdecimal-as-str-type-internally-in-messagepack-format for details.
https://github.com/msgpack/msgpack-java/blob/4b3895488c1263bf91489748bdceac0069bca85e/msgpack-jackson/src/main/java/org/msgpack/jackson/dataformat/MessagePackGenerator.java#L253
When using org.springframework.data.annotation.LastModifiedDate on a Linux machine, a default precision of nanoseconds is used by Java 17. This causes the following error when serializing the data using MessagePack:
This did not cause any issues on Java 11 as the default precision appears to be in microseconds.