-
-
Notifications
You must be signed in to change notification settings - Fork 817
Description
(note: this will replace #730 )
There is an existing problem with JsonGenerator.copyCurrentEvent()
as explained on issue #730.
Unfortunately changing existing implementation has potential serious downsides for usage with binary backends when translating from textual format like JSON (with possible but not necessarily inexact double
vs accurate BigDecimal
) into binary format like CBOR, where latter may desire to just use double
(or float
) value.
Since we do want to offer a way for 100% accuracy-retaining method, it seems safer to introduce a new method as an alternative so caller can specify exactly what to optimize for -- existing method follows whatever JsonParser.getNumberType()
claims is the optimal representation; new method will instead use JsonParser.getNumberValueExact()
.
NOTE: we may consider in near future possibly to add JsonGenerator.copyCurrentStructureExact()
, but initial work is just for copyCurrentEventExact()
.