[QUOTE=daveT;52536252]
A baked-in DTD, typing, and cleaner distinguishing between sections would be nice.
I would like to look at this and be able to say what each end bracket is referring to:
Well, this data is terribly formatted. There's no real protection from that.
JSON Schemas are a thing, I think they're roughly analogous to DTDs although I don't really remember that much about how DTDs work. But a JSON schema can tell you everything that's allowed and where it goes and what types it can take and so forth.
But pretty much any data format is going to leave you having to know what things "mean." It is helpful if it's fairly obvious, but, you know, good luck with that.
I tend to make data structures that are invariant: if a field exists, you'll always get it, though it may be "null" where it doesn't apply. I don't like people to have to guess what fields are available or have to go crazy with checking to see if this or that field is present in THIS record.
Quote:
I'd like better language support for JSON. The best JSON parser I've used is SQL, that's not good.
What language do you use? I've used JSON with C++, python and a little bit with Java and they all seem to do OK. Python does great with json, because python's syntax for data structures is fairly close to json to start with (not that this is without it's problems, I wish json adopted some of the more loose aspects of python DS)
Actually, I've used JSON a tiny bit in mysql and it seems OK there too, as long as you're quite sure what the syntax should be like when searching and inserting and stuff (mostly, how much to quote and where)