3 ms·
Doesn't most of the Rust ecosystem use serde though?
by LambdaComplex 9y ago
Doesn't most of the Rust ecosystem use serde though?
- steveklabnik 9y agoIt looks like serde-json does the same: https://docs.serde.rs/serde_json/struct.Number.html https://docs.serde.rs/serde_json/struct.Number.html
- chrismorgan 9y agoWell, not the same; it eagerly interprets it as PosInt(u64), NegInt(i64) or Float(f64) rather than storing the mantissa and exponent. This is enough for JavaScript compatibility (its Number type being essentially a 64-bit float), but it’s not quite as flexible as the json crate’s approach.