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
@@ -13,7 +13,7 @@ func yamlToJSON(sampleYaml string, indent int) string {
var output bytes.Buffer
writer := bufio.NewWriter(&output)
var jsonEncoder = NewJONEncoder(indent)
var jsonEncoder = NewJONEncoder(indent, false)
inputs, err := readDocuments(strings.NewReader(sampleYaml), "sample.yml", 0, NewYamlDecoder())
if err != nil {
panic(err)