FasterXML / jackson-core

Core part of Jackson that defines Streaming API as well as basic shared abstractions
Apache License 2.0
2.25k stars 773 forks source link

Optimize `JsonParser.getDoubleValue()/getFloatValue()/getDecimalValue()` to avoid String allocation #1284

Closed cowtowncoder closed 2 months ago

cowtowncoder commented 4 months ago

With #1230 done, we can tackle one problem that may have been a regression: the fact that even when following JsonParser methods are used:

there will still be a String allocation even if that is not really needed for deferred decoding (like JsonParser.getNumberValueDeferred()) This may be a regression to address other problems with too-early binding of type.