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
{{ message }}
Repository navigation
Deprecate "exact values" setting from JsonNodeFactory, replace with JsonNodeFeature.STRIP_TRAILING_BIGDECIMAL_ZEROESÂ #3651
With Jackson 2.x there is a setting in JsonNodeFactory that determines whether BigDecimal values are normalized upon read (default) or not. Default value of normalization seems surprising to users, but there is a use-case for normalization too (specifically, trying to normalize JsonNodes to be logically equal for comparisons).
There are 2 main problems:
Configurability by having to create and configure JsonNodeFactory is non-obvious and cumbersome
Default to normalization seems unexpected by many users.
Changing 2 would be easy, but changes behavior so will need to wait either until 3.0, or at least 2.16 if and when the other part goes in 2.15.
So let's:
Add JsonNodeFeature.STRIP_TRAILING_BIGDECIMAL_ZEROES, to have precedence over other settings
Leave JsonNodeFactory setting in place, deprecated
Change code to do "normalization" in caller (JsonNodeDeserializer) NOT in JsonNodeFactory
This allows users to migrate to using JsonNodeFeature.STRIP_TRAILING_BIGDECIMAL_ZEROES for configurability while retaining old behavior for old code.
We can then consider default changes for a later version, separately.
changed the title [-]Remove "exact values" setting from `JsonNodeFactory`, replace with `JsonNodeFeature.NORMALIZE_BIG_DECIMAL`[/-][+]Remove "exact values" setting from `JsonNodeFactory`, replace with `JsonNodeFeature.STRIP_BIG_DECIMAL_ZEROES`[/+]on Nov 7, 2022
changed the title [-]Remove "exact values" setting from `JsonNodeFactory`, replace with `JsonNodeFeature.STRIP_BIG_DECIMAL_ZEROES`[/-][+]Deprecate "exact values" setting from `JsonNodeFactory`, replace with `JsonNodeFeature.STRIP_TRAILING_BIGDECIMAL_ZEROES`[/+]on Jan 25, 2023
Activity
Add test wrt #3651
Initial changes wrt #3651
[-]Remove "exact values" setting from `JsonNodeFactory`, replace with `JsonNodeFeature.NORMALIZE_BIG_DECIMAL`[/-][+]Remove "exact values" setting from `JsonNodeFactory`, replace with `JsonNodeFeature.STRIP_BIG_DECIMAL_ZEROES`[/+][-]Remove "exact values" setting from `JsonNodeFactory`, replace with `JsonNodeFeature.STRIP_BIG_DECIMAL_ZEROES`[/-][+]Deprecate "exact values" setting from `JsonNodeFactory`, replace with `JsonNodeFeature.STRIP_TRAILING_BIGDECIMAL_ZEROES`[/+]Implement #3651: add `JsonNodeFeature.STRIP_TRAILING_BIGDECIMAL_ZEROES`
Implement #3651: add `JsonNodeFeature.STRIP_TRAILING_BIGDECIMAL_ZEROE…
[util] Switch to use non-deprecated Jackson API for exact `BigDecimal`-s
[util] Switch to use non-deprecated Jackson API for exact `BigDecimal…