serde_json_pythonic 0.1.2

serde_json_pythonic fork that includes a Pythonic JSON formatter
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#![cfg(feature = "arbitrary_precision")]

#[test]
fn test() {
    let float = 5.55f32;
    let value = serde_json_pythonic::to_value(float).unwrap();
    let json = serde_json_pythonic::to_string(&value).unwrap();

    // If the f32 were cast to f64 by Value before serialization, then this
    // would incorrectly serialize as 5.550000190734863.
    assert_eq!(json, "5.55");
}