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
org.junit.ComparisonFailure: expected:<25[.000]> but was:<25[]>
Expected :25.000
Actual :25
Is it possible to inject the behaviour I am after?
The JacksonUtils that JsonMergePatch is using sets the factory to JsonNodeFactory.instance and I cannot see a way around this. I would prefer to use the JsonNodeFactory.decimalsAsIs for my specific case.
This also applies to the JsonDiff.asJson(older, newer) with the same behaviour as the above example.
The text was updated successfully, but these errors were encountered:
No unfortunately not. I changed my schemas to string instead of number.
However I did successfully make a version without JacksonUtils but it did not feel like the correct solution.
Hm... in my case I serialize and deserialize some classes with BigDecimal fields using objectmapper. I never had any problems with that, no loss of trailing zeroes.
I only encountered the problem when converting the object to JsonNode (to be used with JsonPatch)
I would like to use the library
withExactBigDecimals
, i.e keeping25.000
when patching a node.Is it possible to inject the behaviour I am after?
The
JacksonUtils
that JsonMergePatch is using sets the factory toJsonNodeFactory.instance
and I cannot see a way around this. I would prefer to use theJsonNodeFactory.decimalsAsIs
for my specific case.This also applies to the
JsonDiff.asJson(older, newer)
with the same behaviour as the above example.The text was updated successfully, but these errors were encountered: