Hacker News new | ask | show | jobs
by drschwabe 1275 days ago
> You can't get any simpler than JSON.

Actually a plain text file containing a JavaScript object is simpler and prettier than JSON.

Not universal across languages though I suppose.

1 comments

JSON, as used in VSC, can be defined as "plain text file containing an object", as configuration files have a hash map as root-level object.

AFAIK the difference between JSON (as used in VSC) and a Javascript object are minimal (no quoting for keys, possibly minor other differences) and using a JS object should have significant advantages in order to replace a de-facto standard.

`Template literals ie- multiline strings without needing escape or newline characters is a signficant advantage of JS object over JSON`

some will argue that scripting would thus be possible if the config was simply JS but that is a rabbit hole both on the debate itself and then the potential compexlity of config; there are trade-offs for/against but not a settled matter IMO as there are major projects like neovim that support full fledged config scripting (in the case of neovim they allow use of Lua)