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
BigDecimal values within a @JsonUnwrapped property are stripping trailing zeros from the JSON source when deserialized. This differs from the behavior of a non-@JsonUnwrapped property, where the trailing zeroes are retained. I would expect the same behavior in both cases, and that ideally (for my use case) the trailing zeroes are retained.
I have confirmed this issue in the latest Jackson, version 2.11.1.
This appears to be the same issue as #632, which was filed against Jackson 2.4.0. I'm opening this as a new issue as requested.
From my tests, this appears to only affect deserialization, and not serialization.
Here is a JUnit 5 test that verifies this difference:
One quick note: I wonder if this might be due to buffering required by @JsonUnwrapped, perhaps similar to #2644. It is not exactly same issue but possible related.
Yes, I can reproduce this, will add a failing test. Most likely same problem as #2644, and same work-around applies here too: enable DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS.
BigDecimal
values within a@JsonUnwrapped
property are stripping trailing zeros from the JSON source when deserialized. This differs from the behavior of a non-@JsonUnwrapped
property, where the trailing zeroes are retained. I would expect the same behavior in both cases, and that ideally (for my use case) the trailing zeroes are retained.I have confirmed this issue in the latest Jackson, version 2.11.1.
This appears to be the same issue as #632, which was filed against Jackson 2.4.0. I'm opening this as a new issue as requested.
From my tests, this appears to only affect deserialization, and not serialization.
Here is a JUnit 5 test that verifies this difference:
The text was updated successfully, but these errors were encountered: