4 ms·
- Someone saves data as text with a simple format - It works great, lots of people start using it - People start adding features to fix annoying things with t
by joeld42 11y ago
- Someone saves data as text with a simple format
- It works great, lots of people start using it
- People start adding features to fix annoying things with the format, add support for binary data, comments, schemas, add more metadata etc..
- Many versions proliferate, people start writing converters and verifiers
- A standards committee is formed and write an 800 page spec and 80kloc reference implementation
- Eighteen different libraries wrap or reimplement the reference implementation
- Someone gets fed up with this nonsense and converts their app to save their data in a new simple text format.
- The circle of life continues.
I love this idea and wish json had comments, too, but if you start hitting the point where JSON is not expressive or fluid enough, that's a hint that it's probably not the right thing for what you're doing. This variant puts a lot of work into human-friendly json, but if you're doing a lot of hand-editing of a file, it should probably not be JSON.
- Animats 11y agoAgreed. Do not want "relaxed JSON". There are editors for valid JSON. Use one of those.[1] [1] http://www.cleancss.com/json-editor/ http://www.cleancss.com/json-editor/
- streblo 11y agoObligatory: https://plus.google.com/+DouglasCrockfordEsq/posts/RK8qyGVaGSr https://plus.google.com/+DouglasCrockfordEsq/posts/RK8qyGVaG...
- cwyers 11y ago> Suppose you are using JSON to keep configuration files, which you would like to annotate. Go ahead and insert all the comments you like. Then pipe it through JSMin before handing it to your JSON parser. And now you can't roundtrip the comments if for some reason your JSON parser needs to change something.
- dclowd9901 11y agoI would prefer not to inspect json for comments. Something is ambiguous, you should have a model definition sent along with everything else.