avro icon indicating copy to clipboard operation
avro copied to clipboard

encode nil slices and maps as null

Open rogpeppe opened this issue 4 years ago • 0 comments

Both maps and slices can already be nil, so perhaps we could encode the union ["null", {"type": "map", "values": "int"}] as map[string]int] not *map[string]int as we do currently.

But this would mean that Go maps and slices would always encode as a null union, which might not be desired.

rogpeppe avatar Jan 22 '20 13:01 rogpeppe