Many tools display data in a custom human-readable format. The fate admin command, and the zookeeper commands, are two examples.
It would be very convenient if there were standard options for computer readable output, similar to git's --porcelain or gpg's --with-colons that guarantees the output is well formatted for computer readability. The awscli tool also does something similar by returning JSON output for most, if not all, of its commands.
If we did go with JSON as a standard, then we should be able to add --json to many commands, to output in JSON format. Alternatively, we could just try to ensure that all output is always computer readable, but that gets tricky if we're displaying data that might have newlines in it, or non-printable characters.
It may be the case that different command will need different computer-readable output formats and options, but it would be nice if we could standardize.
For this ticket, it would be sufficient to make any progress towards creating computer-readable output in the zookeeper utilities, the fate admin utility, or another similar tool, to demonstrate and set a convention for other tools. Then, follow-on tickets could be made to implement the same capability in additional tools.
Many tools display data in a custom human-readable format. The fate admin command, and the zookeeper commands, are two examples.
It would be very convenient if there were standard options for computer readable output, similar to git's
--porcelainor gpg's--with-colonsthat guarantees the output is well formatted for computer readability. The awscli tool also does something similar by returning JSON output for most, if not all, of its commands.If we did go with JSON as a standard, then we should be able to add
--jsonto many commands, to output in JSON format. Alternatively, we could just try to ensure that all output is always computer readable, but that gets tricky if we're displaying data that might have newlines in it, or non-printable characters.It may be the case that different command will need different computer-readable output formats and options, but it would be nice if we could standardize.
For this ticket, it would be sufficient to make any progress towards creating computer-readable output in the zookeeper utilities, the fate admin utility, or another similar tool, to demonstrate and set a convention for other tools. Then, follow-on tickets could be made to implement the same capability in additional tools.