maciejhirsz / json-rust

JSON implementation in Rust
Apache License 2.0
563 stars 63 forks source link

Wish: serialize `decimal` crate objects #184

Open njaard opened 4 years ago

njaard commented 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.

Right now, the only obvious way is to first convert to/from f64, which loses precision.

frewsxcv commented 4 years ago

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

njaard commented 4 years ago

Related issue: #140

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