Skip to content

Comment on Myjson – A simple JSON store for your web or mobile appparent

Comments

To expand on that: only since RFC 7158, earlier versions required the root to be an array or object.

So if you're generating json, it's advisable to wrap it so that parsers written according to the older specs won't choke on it.

However, when parsing, like this, you want to try and accept values.

AboutSource Built by g1lg1l

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