Open njaard opened 4 years ago
The decimal crate implements decimal floating point arithmetic in rust. JSON supports decimal numbers.
It would be nice if there were an obvious way of how to serialize (and deserialize) d128 objects exactly in your json crate.
d128
Right now, the only obvious way is to first convert to/from f64, which loses precision.
f64
Related issue: https://github.com/maciejhirsz/json-rust/issues/140
Related issue: #140
Also my issue, but I filed both for completely different reasons :)
The decimal crate implements decimal floating point arithmetic in rust. JSON supports decimal numbers.
It would be nice if there were an obvious way of how to serialize (and deserialize)
d128
objects exactly in your json crate.Right now, the only obvious way is to first convert to/from
f64
, which loses precision.