Re:JSON as configuration files: please don’t (2016)
by ChrisSD on Saturday April 13, 2019 @02:45PM
(#19654931)
Your link shows nested data structures working? But regardless TOML is a configuration file format (like INI), not a general purpose data structure format (like JSON is).
[ Parent
| on HN ]
Re:JSON as configuration files: please don’t (2016)
by TheDong on Saturday April 13, 2019 @04:45PM
(#19655603)
> general purpose data structure format
General purpose until you need to store dates/times, self-referential structures, enums, etc.
json and toml are both serializations of data. I don't think the line you're trying to draw between "configuration file format" and "data structure format" is a well-defined line.
Re:JSON as configuration files: please don’t (2016)
by ChrisSD on Saturday April 13, 2019 @05:00PM
(#19655690)
Sure it's a blurry line but some formats are better than others for some specific tasks. JSON isn't the right tool for every job but it's a good enough lowest common denominator for data sharing.
I wouldn't want to use if for config files or passing complex data but then it's not designed for that.
Re:JSON as configuration files: please don’t (2016)
by afiori on Saturday April 13, 2019 @05:59PM
(#19656007)
TOML also has more "normal" notations for dicts and lists that are almost the same as JSON.
There is a distinction between markup languages e object notation languages. XML, HTML and Markdown are markup, JSON, YAML, TOML and most other are object notations.
(here my distinction, in general, is if they allow unquoted text)