On 13.03.24 08:31, Sergey Matveev wrote:
Really, honestly, did you try using it?

I'm intensively using YAML for more then a decade in plenty of applications.  As I mentioned, I'm using puppet (which stores all data in YAML) and ansible (which stores just everything in YAML), furthermore tools like cloud-init or CoreOS, and heaps of own software, all using YAML.


But that's not the point. Was just a proposal.




Exactly that is why I use Hjson: it is interoperable with all JSON-aware
tools. Its libraries are designed to convert it to/from JSON and then
using ordinary JSON tools. http://www.nncpgo.org/Configuration.html
contains a note, that Hjson can be trivially converted to JSON. That is
why NNCP includes third-party hjson-cli utility for that purpose.
Moreover, JSON is literally a valid subset of Hjson, so you can use it
directly without any conversion.

Anyway, none of those formats are truly convenient to be processed by
machine. Once I started to write integration tests for NNCP and even
with JSON it is pretty cumbersome to write all those *jq commands to
generate a JSON file with multiple nested structures. It is possible,
without any doubts, but not so easy, doing it with *jq utilities in
shell. That is why I added possibility to use directory layout for the
whole configuration: http://www.nncpgo.org/Configuration-directory.html
Basically, each dictionary becomes a directory, each key is a filename,
its contents is the value.

Nice, but misses the question.

Which still leaves the question open: What is the intended clean way (without workarounds) to distribute the list of neighbors and their public keys, while on the same time keeping the secrets local on the machine,  if they are both in the same file, but there is no tool to selectively modify parts of the file.


regards

Hadmut