21 ms·
Disruption for basically zero benefit. The proposed modifications are utterly trivial and don't really make anyone's life better.
by raymondh 13y ago
Disruption for basically zero benefit.
The proposed modifications are utterly trivial and don't really make anyone's life better.
- davvid 13y agoHey now... When we started using JSON as our file format for scene metadata at Disney Animation these were exactly the features people wanted. Hand-hackability and simplicity is why we use JSON. These changes definitely make things better for humans.
- TheZenPsycho 13y agoI like crockford's suggestion. if you need these features, write javascript. (or something akin to json5), and run it through a minified, or eval it in a javascript sandbox to convert it to plain json.
- MichaelGG 13y agoSo the suggestion for comments in JSON is "don't use JSON"? That's a dumb suggestion, and defeats the entire point of having JSON in the first place. No common formatting/tooling/parsing library can work with the config file if it has a comment. Every app wanting to allow comments needs to go get a full JavaScript EE and parse them as JS? That's absurd. So this proposal is coming back and fixing that silly limitation.
- TheZenPsycho 13y agoThe suggestion for comments was to use JSMin to process them out before handing it over to the json parser. That is, if you really want comments, crockford says, go ahead and add them. Just remember to remove them before parsing as JSON. Which is actually not that hard. you can even do it with sed. Just for the love of crock don't put processing directives in the comments.
- MichaelGG 13y ago"Just remember to remove them"... in other words, don't use JSON. If you have to preprocess it with another program first, then you might as well use another format anyways.
- reverius42 13y ago> If you have to preprocess it with another program first, then you might as well use another format anyways. What?? By that logic, you might as well hand-write x86 assembly, since C requires a "preprocessing" step (some might call that compilation). Using "JSON5" as a human-writable format for storage and then compiling it to real JSON before going over the wire seems like the best of both worlds to me. The wire format benefits are preserved, the format is validated as a side effect of compilation, and you get to write in a well-defined language with comments and bareword-identifiers. Your objection is that you don't want to run a compiler, so you'd rather send JSON5 over the wire?
- cturner 13y ago> dumb suggestion .. defeats the entire point of having JSON in the first place No. Json's mission is to be a wire protocol. You're suggesting using it for other purposes, and in a way that compromises its role here as a wire protocol. It's not intended to be a multi-purpose serialisation format.
- stevenleeg 13y agoAs someone who writes a large amount of node/js, this would definitely make my life easier for when I have to write out a package.json, some other sort of json config, or test data (which happens a lot). All of the proposed changes would take away annoyances that I experience being a human that has to occasionally write JSON by hand. As a side note, negativity for the sake of being negative does not help the conversation at all. Please take that kind of attitude somewhere else.
- serge2k 13y agoExpressing the opinion that these are not useful ideas isn't "negative for the sake of being negative". These are poor modifications. Don't modify JSON to be a better configuration format, just use a better format.
- mgkimsal 13y ago"just use a better format." Rather hard to do when the rest of the world you need to interact wouldn't necessarily move with you.