serde-rs / json

Strongly typed JSON library for Rust
Apache License 2.0
4.85k stars 555 forks source link

Format f64 in error messages using ryu #1107

Closed dtolnay closed 8 months ago

dtolnay commented 8 months ago

This produces a more readable representation using exponential notation for values that might be hundreds of digits when formatted by std::fmt.

It also includes trailing .0 on integer values (https://github.com/serde-rs/serde/pull/2679).