Hacker News new | ask | show | jobs
by mcdonje 274 days ago
IMO, JSON, YAML, and TOML should all interpret all keys as strings, and only enforce quotes when syntactically necessary.

So, `key1` is a string and doesn't need to be quoted. `12345` as a key is interpreted as a string (because keys are strings) and doesn't need to be quoted. `"key 1"` has a space, so it needs to be quoted.

2 comments

We'd have to change the spec and then all the core libs. Big task.

Use more quotes, use yamllint.

Like bash, more quotes and shellcheck.

Specs change from time to time. It requires effort. Nothing new here. It's necessary sometimes. Dealing with annoyances and footguns also takes effort.
I hear you. But, we've already got the shit-sandwhich. Put Tabasco on it.
What does IMO configuration look like
IMO means "in my opinion", or if you were being sarcastic, putting /s helps.