Given that:
- Empty slices/maps are often represented as
nil in go (i.e., go doesn't really care).
- Most other languages distinguish between
null and an empty list/object.
It would be nice to have an option to always encode empty slices/maps as []/{}.
Unfortunately, doing this with an atlas doesn't appear to be possible as maps/slices are generic.
Given that:
nilin go (i.e., go doesn't really care).nulland an empty list/object.It would be nice to have an option to always encode empty slices/maps as
[]/{}.Unfortunately, doing this with an atlas doesn't appear to be possible as maps/slices are generic.