Skip to content

Commit 213b053

Browse files
committed
Fix indent issue in JSON marshalling
The list entries did not use the correct indention. Add prefix to scalar marshalling of list entries.
1 parent 3ea2bbf commit 213b053

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

output_json.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ func (p *OutputProcessor) neatJSONofNode(prefix string, node *yamlv3.Node) error
219219
entry := followAlias(node.Content[i])
220220

221221
if p.isScalar(entry) {
222-
p.neatJSON("", entry)
222+
p.neatJSON(prefix+p.prefixAdd(), entry)
223223

224224
} else {
225225
fmt.Fprint(p.out, prefix, p.prefixAdd())

0 commit comments

Comments
 (0)