Re:JSON5 Data Interchange Format
by thayne on Monday September 27, 2021 @12:30PM
(#28672757)
JSON is "good enough" for a textual, mostly human readable data interchange format. But as a configuration format, for example the package.json file for node/npm/yarn, it is most definitely not "good enough". For two reasons: no comments and no multiline strings. The latter might not be important for some types of configuration, but it is for things that need something like a description that is more than a single sentence.
[ Parent
| on HN ]
Re:JSON5 Data Interchange Format
by throw0101a on Monday September 27, 2021 @04:20PM
(#28675515)
> But as a configuration format, for example the package.json file for node/npm/yarn, it is most definitely not "good enough".
Then perhaps don't use it for a use case it was not designed to address? I understand that JSON is a very handy hammer to have, but not all things are nails.
I mean, that’s all very well, but it’s literally one of only two formats with native support in the browser. So there’s plenty of times you don’t really have any choice other than to hammer that screw in.