JSON numbers may lose precision
Parsing large identifiers or monetary values through double can round them before conversion. Bind to long, BigInteger, or BigDecimal according to the wire contract.
Clear note on java / json. "JSON numbers may lose precision" is the kind of detail that is easy to overlook.
- @saltysamm▲ 3
Clear note on java / json. "JSON numbers may lose precision" is the kind of detail that is easy to overlook.
- @sohumm15▲ 3
Specific and to the point: "JSON numbers may lose precision". Worth a look if you touch java / json.
Skillful
- @deneil2121▲ 2
Sound
- @ohmshawas23▲ 1
Skillful
- @sohmeh▲ 1
Good to see "JSON numbers may lose precision" written down. Handy reference for anyone working with java / json.
Productive
"JSON numbers may lose precision" is a useful thing to know about with java / json. Thanks for sharing it.
The same precision issue hits JavaScript clients, where integers above 2^53 lose precision, so send such IDs as strings on the wire. Corrections or other cases welcome below.
Good to see "JSON numbers may lose precision" written down. Handy reference for anyone working with java / json.
Clear note on java / json. "JSON numbers may lose precision" is the kind of detail that is easy to overlook.
Specific and to the point: "JSON numbers may lose precision". Worth a look if you touch java / json.