public inbox for nncp-devel@lists.cypherpunks.ru
Atom feed
From: Sergey Matveev <stargrave@stargrave•org>
To: nncp-devel@lists.cypherpunks.ru
Subject: Re: Possible error in documentation regarding calls
Date: Mon, 19 Jul 2021 10:59:21 +0300	[thread overview]
Message-ID: <YPUw5cR1/1e8dBaO@stargrave.org> (raw)
In-Reply-To: <79672e72-6e83-338b-178e-bbb55b8233e8@rushpost.com>

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

Greetings!

*** Shawn K. Quinn [2021-07-18 19:26]:
>The last comma after the last brace and before the last bracket should
>not be there from my experience. This was a very difficult configuration
>issue to chase down, especially given that it came from following an
>example in the documentation.

Honestly I do not understand or can not reproduce any kind of problems
with it. I literally can take calls structure from
http://www.nncpgo.org/Call.html save to file, convert from Hjson->JSON
and pretty print it:
    $ cat > foo.hjson <<EOF
    [copied from the site]
    EOF
    $ hjson-cli -c < foo.hjson | gojq
    {
      "calls": [
        {
          "autotoss": true,
          "autotoss-doseen": true,
          "cron": "*/1 * * * MON-FRI",
          "nice": "PRIORITY+10",
          "onlinedeadline": 3600
        },
        {
          "cron": "30 * * * SAT,SUN",
          "maxonlinetime": 1750,
          "nice": "NORMAL",
          "onlinedeadline": 1800,
          "rxrate": 10,
          "txrate": 20
        },
        {
          "addr": "lan",
          "cron": "0 * * * SAT,SUN",
          "xx": "rx"
        },
        {
          "cron": "*/5 * * * * * *",
          "mcd-ignore": true,
          "nock": true,
          "when-tx-exists": true
        }
      ]
    }
I do not see any loss. Pay attention that NNCP's configuration file is
Hjson, not an ordinary JSON. Hjson contains "allow trailing commas"
example on https://hjson.org/. Moreover, actually all those commas can
be completely ommitited and I will remove them from documentation at all.

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2021-07-19  7:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19  0:26 Possible error in documentation regarding calls Shawn K. Quinn
2021-07-19  7:59 ` Sergey Matveev [this message]