diff --git a/src/lib.rs b/src/lib.rs index 11e5afeb..2f62faa6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -265,6 +265,9 @@ impl<'d> Value<'d> { } else { "Infinity".to_owned() } + } else if n == 0.0 { + // Covers both negative and positive zero + "0".to_owned() } else { n.to_string() }