diff options
Diffstat (limited to 'json/write_test.go')
-rw-r--r-- | json/write_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/json/write_test.go b/json/write_test.go index a0e8c3e..b495d94 100644 --- a/json/write_test.go +++ b/json/write_test.go @@ -263,6 +263,22 @@ func TestWrite(t *testing.T) { }, expected: `[[["a"],[]]]`, }, + { + values: []walk.Value { + walk.ArrayValue {{ + Index: 0, + Value: walk.MapValue {{ + Key: "a", + Value: walk.StringValue("a"), + }}, + }}, + walk.ArrayValue {{ + Index: 0, + Value: walk.MapValue{}, + }}, + }, + expected: `[{"a":"a"}]`, + }, } for i, test := range tests { |