Skip to content

Comment on No JSON/MAPS interoperability in 17.0?parent

Comments

The note on numbers can be specifically problematic since the format does not specifically restrict numbers to be represented by doubles but many clients will assume so, creating some hard to find bugs (it's bitten me many times). The others seem more minor compared to its lack of things like maps that support non-string keys.

Hmm.... isn't JSON required to be valid Javascript?

Javascript assumes all numbers are double-precision FP, yes?

> isn't JSON required to be valid Javascript?

Not necessarily. See JSON: The JavaScript subset that isn't - http://timelessrepo.com/json-isnt-a-javascript-subset

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.