Re:Parsing JSON Is a Minefield (2018)
by josefx on Saturday August 17, 2019 @09:02PM
(#20727515)
>This is specific to IEEE 754, not all binary representations have this issue.
Also sometimes it is a feature. The payload of a NaN value can be user defined and some programs use it[1]. The string "NaN" drops information that might be usefull to some programs, it just doesn't affect as many as null -> "null" does.
Also sometimes it is a feature. The payload of a NaN value can be user defined and some programs use it[1]. The string "NaN" drops information that might be usefull to some programs, it just doesn't affect as many as null -> "null" does.
[1] https://github.com/WebKit/webkit/blob/master/Source/JavaScri...