Sunday, November 15, 2015

Configuration files

Often I use INI files (https://en.wikipedia.org/wiki/INI_file) for configuration settings of programs I develop. For programs that need more complicated data structures one could use XML or JSON. Here is a good alternative for JSON: http://hjson.org/.

image

There is some source code to store the comments along with the real data when reading an HJSON file. That is useful to preserve comments when updating the configuration file by a program.

I have also seen a suggestion to use SQLite to store configuration settings.

No comments:

Post a Comment