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: invalid at pizzashack.org (Derek Martin)
- Date: Mon, 22 Jul 2019 15:33:20 -0500
- In-reply-to: <20190713201437.105c987a@mydesk.domain.cxm> <5d29054d.1c69fb81.f282b.a909@mx.google.com>
On Fri, Jul 12, 2019 at 06:10:21PM -0400, Rich Pieri wrote: > 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 [...] > Admittedly that cache isn't easily stored in simple key/value pairs > because it's not simple key/value data like your example. But an .ini file (what we were discussing) IS easily stored in simple key/value pairs, because that's exactly what it is. We were also talking about Python, and it's easy enough to GUARANTEE that such a simple structure is printed readibly: >>> import json >>> print json.dumps({'4': 5, '6': 7}, sort_keys=True, ... indent=4, separators=(',', ': ')) { "4": 5, "6": 7 } On Sat, Jul 13, 2019 at 08:14:37PM -0400, Steve Litt wrote: > Your assertions (not copied here) about Python writing beautful > json is true, but humans, not so much. One could easily write a Python > json beautifier to help, but I still think complex json is hard for a > human to edit. But we're not talking about complex JSON, we're talking about INI file key-value pairs, converted to (pretty much necessarily) simple JSON. Regardless of who's writing it, you'd probably have to go out of your way to make it unreadable, and FWIW on the read end the parser won't care as long as it parses. With those constraints--which were explicitly stated--using JSON is perfectly suitable, and will take almost no time to implement. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience.
- Follow-Ups:
- [Discuss] Application config files
- From: richard.pieri at gmail.com (Rich Pieri)
- [Discuss] Application config files
- References:
- [Discuss] Application config files
- From: richard.pieri at gmail.com (Rich Pieri)
- [Discuss] Application config files
- Prev by Date: [Discuss] Boston Linux and Unix InstallFest LXX Saturday July 27, 2019
- Next by Date: [Discuss] Application config files
- Previous by thread: [Discuss] Application config files
- Next by thread: [Discuss] Application config files
- Index(es):