JSON Codec Updates (#6444)

* Initial commit

* More updates

* Fix tests

* CLI test updates

* Updates

* Updates
This commit is contained in:
Alexander Bezobchuk
2020-06-16 00:20:50 +00:00
committed by GitHub
parent 6a05b83069
commit 35312d098e
35 changed files with 163 additions and 130 deletions
+3 -3
View File
@@ -370,10 +370,10 @@ func (ctx Context) PrintOutput(toPrint interface{}) error {
out, err = yaml.Marshal(&toPrint)
case "json":
out, err = ctx.JSONMarshaler.MarshalJSON(toPrint)
if ctx.Indent {
out, err = ctx.Codec.MarshalJSONIndent(toPrint, "", " ")
} else {
out, err = ctx.Codec.MarshalJSON(toPrint)
out, err = codec.MarshalIndentFromJSON(out)
}
}