Closed lennart6443 closed 11 months ago
Marshalling a non pointer BitSets results in an empty JSON object:
var bs bitset.BitSet bs.Set(0) bytes, _ := json.Marshal(bs) fmt.Println(string(bytes))
To fix this the BitSet.MarshalJSON method needs to be a value receiver instead of a pointer receiver.
This seems to match the documentation: https://pkg.go.dev/encoding/json#RawMessage.MarshalJSON
Marshalling a non pointer BitSets results in an empty JSON object:
To fix this the BitSet.MarshalJSON method needs to be a value receiver instead of a pointer receiver.