Closed dlipin closed 1 year ago
Ok so the question is: is the new behavior erroneous? Yes, it is a change and in hindsight unfortunate. But given there is new behavior for 2.15 I am not sure reverting change is the right thing to do.
Also see #38 for more discussion.
One possible way forward would be to support DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS
, but problem there is that it is disabled by default so using it to determine behavior would mean reverting behavior.
Yet another possibility would be module-specific Feature.
@pjfanning WDYT?
This is very easily worked around - see https://github.com/FasterXML/jackson-datatypes-misc/pull/32#issuecomment-1665267589
The old behaviour had a bug. It did not handle big numbers properly. Users who want doubles can still get doubles by using the API to ask for a Double. Examples in https://github.com/FasterXML/jackson-datatypes-misc/pull/38/files
The code in https://github.com/FasterXML/jackson-datatypes-misc/pull/38 should work in older versions of Jackson too (see https://github.com/FasterXML/jackson-datatypes-misc/pull/40)
Ok I think I'll close this then, after tests were added to document the new behavior.
I'm filing this issue as the result of conversation in pull request: https://github.com/FasterXML/jackson-datatypes-misc/pull/32
Here is the test:
When I run it with Jackson 2.13.4 then it passes. When I run it with Jackson 2.15.0, it fails with error: