3 ms·
What is wrong with JSON? Everything already supports it. JSON has two drawbacks: a lack of comments (although you could add "#" keys in relevant places) and n
by rogerbinns 14y ago
What is wrong with JSON? Everything already supports it.
JSON has two drawbacks: a lack of comments (although you could add "#" keys in relevant places) and no binary support (arbitrary conventions include base64) but this doesn't support binary anyway.
- wvenable 14y agoLack of comments is pretty much a deal breaker for configuration. I see a lot of undocumented JSON used for configuration and I find it difficult to believe that is something we want for the future. Lack of comments makes JSON much better for data exchange than formats with comments.
- nikcub 14y agoA few issues (although I do use JSON in config): It isn't a friendly form of human input. My error rate is 50%+ , you have to lint on save to catch things that are invisible to the naked eye No ability to override, extend or reference keys. This is most useful in config objects where for eg. in a dev object you want to override the username and password for a database connection but not repeat all the other parameters No comments
- rogerbinns 14y agoYou can override in pretty much the same way TOML does. Instead of replacing an underlying object, you update it with the values read from JSON.
- rtpg 14y agocouldn't you just use JS Object notation? you get comments, less cruft (having to quote string definitions in the key-space might be annoying). Am I missing something with that?
- rogerbinns 14y agoWhat is the difference between "JS Object notation" and JSON? Google searches show they are the same thing. JSON definitely does not have comments http://www.json.org/ http://www.json.org/