[HN Gopher] Why JSON Isn't A Good Configuration Language (2018)
___________________________________________________________________
Why JSON Isn't A Good Configuration Language (2018)
Author : optimalsolver
Score : 7 points
Date : 2022-06-07 21:36 UTC (1 hours ago)
(HTM) web link (www.lucidchart.com)
(TXT) w3m dump (www.lucidchart.com)
| linkdd wrote:
| > Write your own
|
| No.
|
| No.
|
| No no no.
|
| Definitely no.
|
| I wish for a standardized configuration format so that I don't
| have to learn a new format for each software. At least JSON, TOML
| (and INI) and YAML are widely used enough so there is little
| chances that you don't know them.
| mdmglr wrote:
| Write your own is a bad option. I have tried it and found that
| you end up spending lots of time maintaining a parser.
|
| I have found some success in my org using JSON with JSON Schema
| [1]. Combine with a json schema aware IDE like VS Code it solves
| the documentation problem.
|
| [1] https://json-schema.org/
| 120bits wrote:
| I went from simple flat file with tab separated configs to xml to
| Protobuf and to JSON/TOML.
|
| Every time we had issues, it was because we were trying to spin
| our OWN version of configuration file. It breaks backward
| compatibility and versioning. Code collaboration was horrible and
| devs were getting frustrated.
| arielcostas wrote:
| Why not use XML? Fairly similar to HTML, which almost everyone
| has probably seen/used at least once, and it's kinda easy to
| understand. It supports comments, attributes and elements and
| schemas (which help with validation, editor autocompletion and
| documentation), and is also widely supported in many languages.
| billconan wrote:
| too verbose. not ergonomic.
___________________________________________________________________
(page generated 2022-06-07 23:02 UTC)