On 2018-04-03, Steve Litt wrote:
> On Mon, 2 Apr 2018 10:34:19 +1000
> Alan Tyree <alanty...@gmail.com> wrote:

>> Hello Steve,
>> I would think YAML is the best choice here. It is easy to type and
>> easy for the beginner to understand. You could provide simple
>> templates for the most common cases. My own feeling is that anything
>> more complicated is going to turn off would-be authors.

> Thanks Alan (and you too Shay)!

> Both of you recommended for YAML and against JSON, made your points
> powerfully, and convinced me not to go with JSON (at least directly).

> I decided not to go with YAML because it's to easy to forget a colon or
> a dash and crash the program. The program would need to be too much of
> a mind reader.

> Instead I'm using several files consisting either of key-value pairs
> separated by an equal sign (people are used to those), or a few of the
> files are lists. I wrote a Python program to turn those files into a
> big, deeply nested dict that can run the program. Also, it will probably
> output a JSON file of the big, deeply nested dict, so all the other
> programs can use it.

If you are using Python anyway, consider the configuration file syntax and
module. It accepts some variations in the input syntax and normalizes this
to Python datatypes.


Reply via email to