BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] Application config files
- Subject: [Discuss] Application config files
- From: richard.pieri at gmail.com (Rich Pieri)
- Date: Fri, 12 Jul 2019 18:10:21 -0400
- In-reply-to: <20190712211615.GB31101@bladeshadow.org>
- References: <CAEvgogF9s200fVh_HaO2dHnmVV94vJ4gSSaWWOCj+YwN1mFMGw@mail.gmail.com> <20190712174001.zf5gvwbpfsqlkqjh@randomstring.org> <20190712140720.38215f7c@mydesk.domain.cxm> <20190712211615.GB31101@bladeshadow.org>
On Fri, 12 Jul 2019 16:16:15 -0500 Derek Martin <invalid at pizzashack.org> wrote: > I largely disagree. If it's currently in INI format the equivalent > JSON should generally be perfectly human-readable, e.g.: Computer-generated JSON can be human-readable. Doesn't mean it will be. Often enough it is not. Very not. For example, my Calibre metadata sources cache is 174KB dumped into 24 lines of text one of which is the open brace and another is the close brace. That's 22 lines of unreadable, computer-generated JSON. Admittedly that cache isn't easily stored in simple key/value pairs because it's not simple key/value data like your example. Use JSON if you need to store complex data. Otherwise I suggest avoiding it. Avoid YAML. It's great for Ansible because Ansible has test modes so you can verify that the code acutally does what it's supposed to do before it wrecks things. Unless you're exposing your configuration parser for external testing then YAML should be taken off the table. INI and TOML are basic key/value stores. They are easily read and modified by humans and there are parsers available in pretty much any language you care to use (they're also not difficult to write if you have an exception). If you need human readability (and optionally human writability) then either INI or TOML are good choices to consider. -- Rich Pieri
- Follow-Ups:
- [Discuss] Application config files
- From: invalid at pizzashack.org (Derek Martin)
- [Discuss] Application config files
- From: gaf at gapps.blu.org (Jerry Feldman)
- [Discuss] Application config files
- References:
- [Discuss] Application config files
- From: gaf.linux at gmail.com (Jerry Feldman)
- [Discuss] Application config files
- From: dsr at randomstring.org (Dan Ritter)
- [Discuss] Application config files
- From: slitt at troubleshooters.com (Steve Litt)
- [Discuss] Application config files
- From: invalid at pizzashack.org (Derek Martin)
- [Discuss] Application config files
- Prev by Date: [Discuss] Application config files
- Next by Date: [Discuss] Application config files
- Previous by thread: [Discuss] Application config files
- Next by thread: [Discuss] Application config files
- Index(es):