Merge PR #3688: JSON Decode Log in REST Client

This commit is contained in:
Alexander Bezobchuk
2019-02-22 12:54:31 +01:00
committed by Christopher Goes
parent 2121160d29
commit 0611d2eda2
6 changed files with 76 additions and 30 deletions
+1
View File
@@ -254,6 +254,7 @@ func (ctx CLIContext) PrintOutput(toPrint fmt.Stringer) (err error) {
switch ctx.OutputFormat {
case "text":
out = []byte(toPrint.String())
case "json":
if ctx.Indent {
out, err = ctx.Codec.MarshalJSONIndent(toPrint, "", " ")