-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trailing zeros are stripped when reading BigDecimal
as JsonNode
#3650
Comments
Difference here is with the handling of https://github.com/FasterXML/jackson-future-ideas/wiki/JSTEP-2 (see the section for Now: it is actually possible to change this behavior, although it is not quite as easy as many other features.
and then configuring
with this, the exact value will be retained. |
BigDecimal
as JsonNode
I think above explanation shows how to disable trailing-zeroes-stripping; plus #3651 (to be included in 2.15.0) will allow easier configurability. Closing. |
Describe the bug
BigDecimal values are stripping trailing zeros from the JSON source when the concrete type is selected using a custom deserializer (
@JsonDeserialize
). This differs from the behavior of directly deserializing to the same concrete type, where the trailing zeroes are retained.Version information
2.13.4.2
To Reproduce
Expected behavior
The same behavior in both cases, that the trailing zeroes are retained.
Additional context
This appears to be the very similar to the issue #2784.
The text was updated successfully, but these errors were encountered: