43
What is the best file format for configuration file?
(programming.dev)
A community for discussion amongst professional software developers.
Posts should be relevant to those well into their careers.
For those looking to break into the industry, are hustling for their first job, or have just started their career and are looking for advice, check out:
It depends what you need your configuration file to be:
Need a well defined easy to understand concrete configuration file?
.toml
. It was made to be both human and computer friendly while taking special attention to avoid the pitfalls commonly found in other configuration files by explicitly stating expected types around commonly confused areas.Need a simple to implement configuration file?
.json
. It's famous for being so simple it's ~~creator~~ "discoverer" could define it on a business card.Need an abstract configuration file for more complicated setups?
.ncl
. Nickle allows you to define functions so that you can generate/compute the correct configuration by changing a few variables/flags.