4 ms·
JSON is actually a really good format, I disagree with their premise "JSON sucks". Like, sure it's got some use cases it doesn't handle well, but overall there'
by douglee650 4y ago
JSON is actually a really good format, I disagree with their premise "JSON sucks". Like, sure it's got some use cases it doesn't handle well, but overall there's a reason it won.
- ilyt 4y agoThe reason it won is "most popular(and only) web language used it". I'm not saying it's bad, I'm saying it didn't won on technical merits. I do dislike people using them for configs tho, even indented the readability is just "okay", the ease of change is worse than YAML (even with all it's problem), especially forcing no trailing `,` is just plainly obnoxious.
- yamtaddle 4y agoThe lack of ability to concretely define data structures is a huge pain, both when using it and when writing libraries to process it. You can throw JsonSchema at it, but now you have two problems. Can't use comments to try to work around that deficiency, even just to communicate intent to someone looking at an example record, at least not in vanilla json. Record streaming—basically necessary at anything resembling "scale", if you don't want to kill performance—is a non-standard afterthought in most of the ecosystem. It wastes my time and tends, in practice, to cause bugs, all for no good reason. I'd say "sucks" is accurate. Not that it's the only bad format we've come up with lately (YAML, ugh).
- user3939382 4y agoI use JSON Schema written in JSON5. That at least fixes the commenting problem.