Add JsonGenerator.copyCurrentEventExact
as alternative to copyCurrentEvent()
#984
Milestone
JsonGenerator.copyCurrentEventExact
as alternative to copyCurrentEvent()
#984
(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 accurateBigDecimal
) into binary format like CBOR, where latter may desire to just usedouble
(orfloat
) 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 useJsonParser.getNumberValueExact()
.NOTE: we may consider in near future possibly to add
JsonGenerator.copyCurrentStructureExact()
, but initial work is just forcopyCurrentEventExact()
.The text was updated successfully, but these errors were encountered: