fn float_to_json(f: f64) -> serde_json::Value {
            match serde_json::Number::from_f64(f) {
                Some(n) => serde_json::Value::Number(n),
                None => serde_json::Value::String(f.to_string()),
            }
        }
// Convert most floats to a JSON Number. JSON Numbers don't support NaN or
// Infinity, so those will still be rendered as strings.
Convert most floats to a JSON Number. JSON Numbers don't support NaN or
Infinity, so those will still be rendered as strings.
Convert most floats to a JSON Number . JSON Numbers don ' t support NaN or Infinity so those will still be rendered as strings .
fn float_to_json(f: f64) -> serde_json::Value {
            match serde_json::Number::from_f64(f) {
                Some(n) => serde_json::Value::Number(n),
                None => serde_json::Value::String(f.to_string()),
            }
        }
fn float_to_json ( f : f64 ) -> serde_json :: Value { match serde_json :: Number :: from_f64 ( f ) { Some ( n ) => serde_json :: Value :: Number ( n ) , None => serde_json :: Value :: String ( f . to_string ( ) ) , } }
Convert most floats to a JSON Number.
Convert most floats to a JSON Number .
f
f64
f
f64