JSON input / output for CLI utilities

Gary gary at catalyst.net.nz
Sun May 30 20:57:57 UTC 2021



On 28/05/21 12:03 pm, Douglas Bagnall via samba-technical wrote:
> 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.
For C lib/audit_logging contains wrappers for the jansson functions.
It probably wants the JSON functions split out into a separate libary
> 
>> 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
> 
> 
> 

-- 
Catalyst IT - Open Source Technologists
DDI: +64 4 123 4567 | Mob: +64 21 123 4567 | Tel: +64 4 123 4567 |
www.catalyst.net.nz

CONFIDENTIALITY NOTICE: This email is intended for the named recipients
only. It may contain privileged, confidential or copyright information.
If you are not the named recipient, any use, reliance upon, disclosure
or copying of this email or its attachments is unauthorised. If you have
received this email in error, please reply via email or call +64 4 499 2267.



More information about the samba-technical mailing list