Re: Machine readable output for tgtadm --lld [driver] --op show --mode target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Dr. Volker Jaenisch" <volker.jaenisch@xxxxxxxxx> writes:

> JSON you may easily use from within C (And some dozens of other languages).
> Please have a look at http://json.org where you will find to 5 JSON  
> libraries for C.

It is possible to parse JSON from C, but it's not anywhere near as
convenient as a simple strsep() parser would be, and the situation from
shell scripts is pretty bleak. Consequently, it wouldn't be my data format
of choice for systems work, and given a choice between the current 'human
readable' output and JSON, we'll probably just continue parsing the existing
output as it is marginally less expensive code-wise and mean we don't pull
in another unnecessary dependency.

However, as I say we'd definitely see benefit from a simpler, more regular
text format output, so if you produce an JSON-output option with an option
syntax which extends naturally to other formats, e.g. --format=json,
--format=brief, and so on, I'd be happy to write a supplementary patch
adding a 'brief text' format on top.

Best wishes,

Chris.
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux