We are using jackson, and I see this in the code
DeserializationConfig.Feature.USE_BIG_DECIMAL_FOR_FLOATS
DeserializationConfig.Feature.USE_BIG_INTEGER_FOR_INTS
But how do I get jackson to use those features now?
This would be the perfect situation. I just want a Map result with String, BigDecimal and BigIntegers.
Enable the feature on the ObjectMapper.
ObjectMapper mapper = new ObjectMapper();
mapper.enable(DeserializationConfig.Feature.…);
Update for version >= 2.0.0:
ObjectMapper mapper = new ObjectMapper();
mapper.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS);
mapper.enable(DeserializationFeature.USE_BIG_INTEGER_FOR_INTS);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With