JSON is like the carcinization of programming
What’s it called when people try to reinvent Lisp for the hundredth time?
carthinazation
Chuck in comments and I’m on board.
They were chucked out because, according to the guy who defined it, people started using them for parsing directives, which hurt interoperability because now you needed to be sure that the parser would both read the comments and interpret them correctly. Suddenly, those comments might make otherwise identical files parse differently. If the whole point is that it’s reliable and machine-readable, keeping it to the minimal set of features and not extending it any way whatsoever is a good way to ensure compatibility.
What you can do is define some property for comments. It’s not standardised, but you could do stuff like
{ "//": "This is a common marker for comments", "#": "I've never seen that as a property name, so it might be safe?", "_comment": "Property names with underscore for technical fields seem common enough as well, and it's semantically explicit about its purpose" }“_comment”
I appreciate the workaround here, and I’ve tried this in production environments to one degree or another. This usually fails due to another problem: the number of systems that think unexpected JSON keys are an error, is is too damn high.
Just make JSON5 the new official version and I would be ok
If yaml didn’t have anchors and 8 different white space formats, it’d be a great replacement for this kind of thing.
But yaml is a mess, and you’d think you could parse it easily, but you can’t.
I have a fundamental disdain for formats with restrictive white space definitions (I’m looking too at you Python)
I’ve never had this issue with Python, but makefile has given me plenty of whitespace issues.
Should have added if it cares about tabs vs spaces.
YAML is redeemed by one thing only:
All JSON is valid YAML.
No way. You’re telling me I can just write json instead?
orange = { you = "glad", I = { didn\'t = { say = "banana" } } }deleted by creator






