JSON input / output for CLI utilities
martin at meltin.net
Sat May 29 09:55:50 UTC 2021
On Thu, 27 May 2021 17:42:20 -0400, Andrew Walker via samba-technical
<samba-technical at lists.samba.org> wrote:
> I know we've added JSON output to a few of the CLI utils. Over the past
> year or so I've added this to various utils in FreeNAS (using libjansson).
> Is there an overall strategy for this? I'd be happy to upstream what I have.
> Also is there an effort to add support for JSON input to them?
Your effort appears to be it! Thanks for that! :-)
One wishlist item to think about... and my example is for CTDB... :-)
If adding JSON output and, perhaps, input it would cool to have the
command-line tools be able to run in a mode where they stay connected
to the relevant Unix domain socket. The most useful example would
allow "ctdb statistics" to be repeatedly run within the one session, so
a reporting tool can periodically collect the output without the need
This could go hand-in-hand with addition of an interactive mode on
tools that don't have one (e.g. "ctdb").
If this is an interesting idea then I'm happy to try to work on that
with you in whatever time I have available...
peace & happiness,
More information about the samba-technical