pub fn number(v: f64) -> Value
A JS-style number: integral doubles become JSON integers (1, not 1.0), everything else stays a float. NaN/±∞ become null like JSON.stringify.
1
1.0
NaN
±∞
null
JSON.stringify