public inbox for nncp-devel@lists.cypherpunks.ru
Atom feed
From: Hadmut Danisch <hadmut@danisch•de>
To: nncp-devel@lists.cypherpunks.ru
Subject: Re: hjson file format
Date: Wed, 13 Mar 2024 19:34:00 +0200	[thread overview]
Message-ID: <ff3d932d-8816-4289-8cdd-df66d78f50a8@danisch.de> (raw)
In-Reply-To: <ZfFIZEQpov5c0pvh@stargrave.org>

[-- Attachment #1: Type: text/plain, Size: 1869 bytes --]


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


[-- Attachment #2: Type: text/html, Size: 2809 bytes --]

  reply	other threads:[~2024-03-13 17:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 22:53 hjson file format Hadmut Danisch
2024-03-13  6:31 ` Sergey Matveev
2024-03-13 17:34   ` Hadmut Danisch [this message]
2024-03-13 17:45     ` Sergey Matveev
2024-03-13 17:39   ` Sergey Matveev
2024-03-13 21:54     ` Emery Hemingway