diff --git a/go.mod b/go.mod index 6b61a1f2..aecea1a6 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 golang.org/x/net v0.9.0 + golang.org/x/text v0.9.0 gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 gopkg.in/yaml.v3 v3.0.1 ) @@ -25,7 +26,6 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect golang.org/x/sys v0.7.0 // indirect - golang.org/x/text v0.9.0 // indirect golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect ) diff --git a/pkg/yqlib/json_test.go b/pkg/yqlib/json_test.go index b2eddb58..919fce9f 100644 --- a/pkg/yqlib/json_test.go +++ b/pkg/yqlib/json_test.go @@ -80,6 +80,13 @@ const roundTripMultiLineJson = `{ ` var jsonScenarios = []formatScenario{ + { + description: "array null", + skipDoc: true, + input: "[null]", + scenarioType: "roundtrip-ndjson", + expected: "[null]\n", + }, { description: "set tags", skipDoc: true,