Comment on Show HN: Python JSON library in Rust, faster than ujsonparentComments−tlb7yJSON doesn't support NaN or infinity, so most JS implementations emit null for NaN, +Inf, -Inf. In Node: > JSON.stringify({nan: 0/0, inf: 1/0, neginf:-1/0}) '{"nan":null,"inf":null,"neginf":null}' I'm not sure if throwing an exception is better or worse.−lilyball7yOk, but the line I quoted wasn't about infinity, it was about numbers that were "too large", which I assume means bignums.
Comments
JSON doesn't support NaN or infinity, so most JS implementations emit null for NaN, +Inf, -Inf. In Node:
I'm not sure if throwing an exception is better or worse.Ok, but the line I quoted wasn't about infinity, it was about numbers that were "too large", which I assume means bignums.