Added NDJSON decoder (#1281)

This commit is contained in:
Mike Farah
2022-07-27 12:26:22 +10:00
committed by GitHub
parent c2c48bbe1d
commit b9a1ef89fe
13 changed files with 425 additions and 15 deletions
+2 -2
View File
@@ -2,9 +2,9 @@ package yqlib
import (
"bytes"
"encoding/json"
"io"
"github.com/goccy/go-json"
yaml "gopkg.in/yaml.v3"
)
@@ -28,7 +28,7 @@ func mapKeysToStrings(node *yaml.Node) {
}
}
func NewJONEncoder(indent int, colorise bool) Encoder {
func NewJSONEncoder(indent int, colorise bool) Encoder {
var indentString = ""
for index := 0; index < indent; index++ {