9 ms·
At work, we needed a config file for some employees to sit alongside a custom (non-web) script I wrote. These employees have zero technical knowledge (like, the
by rob 3y ago
At work, we needed a config file for some employees to sit alongside a custom (non-web) script I wrote. These employees have zero technical knowledge (like, they wouldn't know basic HTML), and I found TOML to be pretty easy for them to understand. It looks like this:
# config.toml
[[podcasts]]
title="Podcast 1"
export_label="Label 1"
[[podcasts]]
title="Podcast 2"
export_label="Label 2"
It's flat for them, but gives me a nice `$podcasts` array of nested objects to work with and they don't need to worry about curly braces, indenting, etc. They can just copy/paste three lines if they need to "add" a new one.
Of course, my use case is pretty simple and these are simple string values, but I found it pretty nice.