Added colors to json output #1208

This commit is contained in:
Mike Farah
2022-05-22 21:19:59 +10:00
parent 7d28e4e0de
commit fbe49c3700
9 changed files with 32 additions and 18 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ func configurePrinterWriter(format yqlib.PrinterOutputFormat, out io.Writer) (yq
func configureEncoder(format yqlib.PrinterOutputFormat) yqlib.Encoder {
switch format {
case yqlib.JSONOutputFormat:
return yqlib.NewJONEncoder(indent)
return yqlib.NewJONEncoder(indent, colorsEnabled)
case yqlib.PropsOutputFormat:
return yqlib.NewPropertiesEncoder()
case yqlib.CSVOutputFormat: