Subject: Re: Possible error in documentation regarding calls

From: Sergey Matveev <[email-masked]>
Date: Mon, 19 Jul 2021 10:59:21 +0300

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