I will use this issue as a kind of bookmark to store all information about number handling issues/questions in Leshan.
In a general way, our encoder/decoder have to deal with different kind of number encoding.
By default, we should be sure those conversions are done without any information lost.
We begin to do that in NumberUtil class but not yet fully done.
Maximize JSON/CBOR interoperability ?
Should we limit range and precision of numbers to IEEE 754 binary64 (double precision) to maximize interoperability by default ?
This would affect old JSON / SenML-JSON / SenML-CBOR encoding :
I will use this issue as a kind of bookmark to store all information about number handling issues/questions in Leshan.
In a general way, our encoder/decoder have to deal with different kind of number encoding.
By default, we should be sure those conversions are done without any information lost. We begin to do that in
NumberUtil
class but not yet fully done.Maximize JSON/CBOR interoperability ? Should we limit range and precision of numbers to IEEE 754 binary64 (double precision) to maximize interoperability by default ?
This would affect old JSON / SenML-JSON / SenML-CBOR encoding :
It seems this is a real world question in JSON world : https://github.com/FasterXML/jackson-databind/issues/911
Some links about how to handle this kind of conversion safely :
Non exhaustive list of Leshan issue relative to that :