Json: Support deserializing f32 and f64 from null

Created on 19 Jan 2017  路  3Comments  路  Source: serde-rs/json

Currently f32::NAN and f64::NAN get serialized as null but fail to deserialize back as NAN.

cc @sfackler

bug

Most helpful comment

It's a bit awkward since inifinity and -infinity also go to null :( Yay JSON

All 3 comments

It's a bit awkward since inifinity and -infinity also go to null :( Yay JSON

Could we make a trait wrapper?

It could be something like f64PosInfinity/f64NegInfinity or just f64Infinity,f64NaN?

Hi,

is there a canonical way of dealing with this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mfarrugi picture mfarrugi  路  4Comments

kazimuth picture kazimuth  路  3Comments

subhojit777 picture subhojit777  路  3Comments

selaux picture selaux  路  7Comments

vityafx picture vityafx  路  6Comments