Skip to content

Commit

Permalink
Introduce float_roundtrip cargo cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jun 8, 2020
1 parent 4630190 commit 91ac26a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ alloc = ["serde/alloc"]
# while preserving the order of map keys in the input.
preserve_order = ["indexmap"]

# Use sufficient precision when parsing fixed precision floats from JSON to
# ensure that they maintain accuracy when round-tripped through JSON.
float_roundtrip = []

# Use an arbitrary precision number representation for serde_json::Number. This
# allows JSON numbers of arbitrary size/precision to be read into a Number and
# written back to a JSON string without loss of precision.
Expand Down

0 comments on commit 91ac26a

Please sign in to comment.