Skip to content

v1.0.54

Compare
Choose a tag to compare
@dtolnay dtolnay released this 09 Jun 19:51
· 670 commits to master since this release
v1.0.54
310c55c
  • Add float_roundtrip feature to enable a slower but higher precision float parser based on lexical.

    Enabling float_roundtrip will use sufficient precision when parsing fixed precision floats from JSON to ensure that they maintain accuracy when round-tripped through JSON. This comes at an approximately 2x performance cost for parsing floats compared to the default best-effort precision.

    Unlike arbitrary_precision, the new float_roundtrip feature makes f64 -> JSON -> f64 produce output identical to the input. arbitrary_precision is for making JSON -> serde_json::Number -> JSON produce output identical to the input.

    serde_json = { version = "1.0.54", features = ["float_roundtrip"] }