JSON input / output for CLI utilities
ab at samba.org
Mon May 31 06:15:22 UTC 2021
On ma, 31 touko 2021, Andrew Bartlett via samba-technical wrote:
> On Sun, 2021-05-30 at 21:14 -0400, Andrew Walker via samba-technical
> > On Fri, May 28, 2021 at 11:15 AM Ralph Boehme <slow at samba.org> wrote:
> > > Am 27.05.21 um 23:42 schrieb Andrew Walker via samba-technical:
> > > > 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.
> > >
> > > I guess as what you have worked for FreeNAS/TrueNAS and unless it's
> > > somehow tailored to specific usecases, it should be good as is. :)
> > >
> > > > Also is there an effort to add support for JSON input to them?
> > >
> > > Not that I know of, but that sounds like a nice addition for some
> > > tools.
> > > For which tools do you have JSON input support?
> > >
> > I'm in the process of adding support for pdbedit, net groupmap, and
> > net
> > conf. I see one of major advantages of JSON input support for some of
> > these
> > is we can trivially add support for batch operations. Libjansson is
> > quite
> > easy to work with for doing json input via json_loads().
> Cool. I'm really excited to see this expanded. It is awesome when an
> idea spreads beyond the original developer's narrow use case like this!
+1 to that. Thank you, Andrew W. -- I was looking at something like that
myself but never got enough time to kick it off.
/ Alexander Bokovoy
More information about the samba-technical