Karabiner-Elements icon indicating copy to clipboard operation
Karabiner-Elements copied to clipboard

User configuration files should be stored in a human-friendly file format

Open jottr opened this issue 3 years ago • 9 comments

I have tried to modify/create my own complex modifications but found the json format extremely difficult to work with.

The json format is great for data interchange between applications or to consume as an API, but difficult for humans to parse and manually edit. This creates a barrier of entry for many users who wish to create more complex and custom configurations.

I would like to suggest the move away from json to something more human readable like YAML or TOML or even plain old UNIX style rc type files.

This would increase UX significantly.

jottr avatar May 02 '21 22:05 jottr

I can only agree. I tried today to clean up my quite large configration file and actual I failed, because it is so hard to have an overview with all the various brackets, each on a single line.

obfischer avatar Jul 25 '21 19:07 obfischer

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 09 '22 07:01 stale[bot]

Bad bot.

jottr avatar Jan 09 '22 15:01 jottr

@tekezo what are your thoughts? Is this feature request something that might have a chance to end up on the roadmap?

jottr avatar Jan 09 '22 15:01 jottr

@jottr I am using now YAML to write my configuration. By the help of a small script, I convert the YAML source into JSON.

Acutally it is the first time I understand the configuration and my whole configuration became much more powerful. YAML is much, much better to read and to understand compared to JSON.

obfischer avatar Jan 09 '22 21:01 obfischer

@obfischer his sounds useful. Do you mind sharing it as a gist?

jottr avatar Jan 12 '22 23:01 jottr

@jottr, yes, I will do that.

obfischer avatar Jan 30 '22 09:01 obfischer

Here is the Gist with the shell script for converting YAML to JSON and my current configuration in YAML.

https://gist.github.com/obfischer/b2c902997ae7775fb4e63f67707ba80f

obfischer avatar Jan 30 '22 09:01 obfischer

Here is the Gist with the shell script for converting YAML to JSON and my current configuration in YAML.

gist.github.com/obfischer/b2c902997ae7775fb4e63f67707ba80f

thanks for sharing your setup and your tools

i must agree - the yaml code is much butter to understand and to edit than the json file

muescha avatar Aug 15 '22 15:08 muescha