I have been using YAML as configuration file format in several applications, and all went well except one thing: when my program needs to write/modify a config variable in a YAM
One approach to this is using "lenses". See Augeas for one implementation.