gabs icon indicating copy to clipboard operation
gabs copied to clipboard

Empty array becomes null

Open cschloer opened this issue 5 years ago • 1 comments

Hey,

I'm wrapping a map[string]{interface} that has an empty array in it ([]). The resulting Container has a null value rather than a [].

I think the issue might be related to this: https://www.danott.co/posts/json-marshalling-empty-slices-to-empty-arrays-in-go/

Is there any chance of this being supported? Thanks.

cschloer avatar Apr 28 '20 15:04 cschloer

Hey @cschloer, not sure how we'd catch this within gabs without a lot of reflection but I can take a look when I have some free time.

Jeffail avatar May 21 '20 20:05 Jeffail