JSON input / output for CLI utilities

Douglas Bagnall douglas.bagnall at catalyst.net.nz
Fri May 28 00:03:17 UTC 2021


On 28/05/21 9:42 am, Andrew Walker via samba-technical 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.

Yes, please upstream.

I think the strategy is to look around and aim for consistency between 
tools, but don't let the lack of clear conventions stop you.

jansson is the right thing for C; the standard python library is right 
for python.

> Also is there an effort to add support for JSON input to them?

No effort, but I think we would want to where it makes sense.

Douglas





More information about the samba-technical mailing list