cpp-hocon icon indicating copy to clipboard operation
cpp-hocon copied to clipboard

Is there a way to write configuration parameters to files ?

Open zhuzd12 opened this issue 5 years ago • 1 comments

I appreciate the work you have done to provide a C++ support for the HOCON configuration file format. I wonder if there is API available to write configuration parameters to files at runtime or any schedules about this.

zhuzd12 avatar Jun 12 '20 10:06 zhuzd12

The general pattern is to load a config_document via https://github.com/puppetlabs/cpp-hocon/blob/master/lib/inc/hocon/parser/config_document_factory.hpp, make changes to it with https://github.com/puppetlabs/cpp-hocon/blob/master/lib/inc/hocon/parser/config_document.hpp, then call render().

This project could definitely benefit from some documented examples, but I don't know that anyone is currently planning to add them.

MikaelSmith avatar Jun 12 '20 15:06 MikaelSmith