Unwrap scalar now works for JSON encoding when explicitly set #1409

This commit is contained in:
Mike Farah
2022-11-10 19:21:18 +11:00
parent fae1dbf0be
commit 1d35134310
10 changed files with 147 additions and 19 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 = NewJSONEncoder(indent, false)
var jsonEncoder = NewJSONEncoder(indent, false, false)
inputs, err := readDocuments(strings.NewReader(sampleYaml), "sample.yml", 0, NewYamlDecoder(ConfiguredYamlPreferences))
if err != nil {
panic(err)