You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the 0.4 changes, parsing decimals from JSON results in artefacts from those numbers going via f64. serde-json has support for abitrary precision parsing, which would solve this without reverting to 0.3 behaviour.
This is something I might be able to work on, but I wanted to check if it would be considered first. I think the way rust-decimal handled it is fairly good, and so would probably copy that behaviour if this was considered reasonable.
This is somewhat a duplicate of #113 but wanted to raise it separately as it's more focussed on this particular approach to fixing it.
The text was updated successfully, but these errors were encountered:
Yeah, that sounds good to me. I'm not familiar with implementing serde transformations. Is it essentially a function mapping &str -> BigDecimal?
I've been splitting code into "impl" modules instead of putting everything in lib.rs. You can make impl_serde.rs and put code and tests in there. Branch off of trunk.
I think we had a limit of serde_json = "<1.0.101" due to incompatibilities with minimum-supported-rust-version 1.43. If that's an issue we'll merge this into an 0.5.0 branch. I'm trying not to stray too far from the num_ crates' MSRV of 1.31.
With the 0.4 changes, parsing decimals from JSON results in artefacts from those numbers going via f64. serde-json has support for abitrary precision parsing, which would solve this without reverting to 0.3 behaviour.
This is something I might be able to work on, but I wanted to check if it would be considered first. I think the way rust-decimal handled it is fairly good, and so would probably copy that behaviour if this was considered reasonable.
This is somewhat a duplicate of #113 but wanted to raise it separately as it's more focussed on this particular approach to fixing it.
The text was updated successfully, but these errors were encountered: