PATCH: add support for printing keymgr list in JSON
The attached patch adds support for printing keymgr zone list
in JSON as suggested earlier today.
JSON is triggered by option -j
(JSON). I have also used the json.[ch]
which have been used in the existing kdig and stats MR.
The list of keys is always a JSON array:
$ keymgr one.example list -j
[
{
"zone": "one.example.",
"id": "0735cbe3ae4e76e671037b079d004265edb89c09",
"ksk": true,
"zsk": false,
"tag": 16106,
"algo": 13,
"size": 256,
"public-only": false,
"pre-active": 0,
"publish": 1652185541,
"ready": 1652185541,
"active": 1652185541,
"retire-active": 0,
"retire": 0,
"post-active": 0,
"revoke": 0,
"remove": 0
}
]
Timestamps are integer if UNIX epoch format was requested, string otherwise:
"publish": "2022-05-10T12:25:58Z",
...
"publish": "-1h7m24s",
...
"publish": 1652185558,