Numbers are always be parsed to Value::F64
zonyitoo opened this issue · 0 comments
zonyitoo commented
{
# specify rate in requests/second (because comments are helpful!)
rate: 1000
}
This is the example taken from README
. And we have to use the value of rate
by as_f64
like this:
let rate = sample.get("rate").unwrap().as_f64().unwrap();
1000
should be Value::U64
or at least Value::I64
.
Maybe we can represent number values as Value::Number
like serde-json
does?