json-rust icon indicating copy to clipboard operation
json-rust copied to clipboard

Wish: serialize `decimal` crate objects

Open njaard opened this issue 5 years ago • 2 comments

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.

njaard avatar May 21 '20 20:05 njaard

Related issue: https://github.com/maciejhirsz/json-rust/issues/140

frewsxcv avatar May 25 '20 20:05 frewsxcv

Related issue: #140

Also my issue, but I filed both for completely different reasons :)

njaard avatar May 26 '20 18:05 njaard