Skip to content

Commit 3ae24a5

Browse files
committed
Contrast float_roundtrip and arbitrary_precision
1 parent 7e5a529 commit 3ae24a5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,17 @@ preserve_order = ["indexmap"]
5959
# ensure that they maintain accuracy when round-tripped through JSON. This comes
6060
# at an approximately 2x performance cost for parsing floats compared to the
6161
# default best-effort precision.
62+
#
63+
# Unlike arbitrary_precision, this feature makes f64 -> JSON -> f64 produce
64+
# output identical to the input.
6265
float_roundtrip = []
6366

6467
# Use an arbitrary precision number representation for serde_json::Number. This
6568
# allows JSON numbers of arbitrary size/precision to be read into a Number and
6669
# written back to a JSON string without loss of precision.
70+
#
71+
# Unlike float_roundtrip, this feature makes JSON -> serde_json::Number -> JSON
72+
# produce output identical to the input.
6773
arbitrary_precision = []
6874

6975
# Provide a RawValue type that can hold unprocessed JSON during deserialization.

0 commit comments

Comments
 (0)