This PR adds JSON output to all CLI commands, if the --json switch is set.
If the command does not output anything: Return an empty message.
It also makes sure that error messages are output in JSON, if it is an Exception, that the CLI has already handled before. Thus the key error-message will be present if the return code is != 0.
This PR adds JSON output to all CLI commands, if the --json switch is set. If the command does not output anything: Return an empty message.
It also makes sure that error messages are output in JSON, if it is an Exception, that the CLI has already handled before. Thus the key
error-message
will be present if the return code is!= 0
.