Context
Decoding a BSON null (or undefined) into the slice-backed raw types is inconsistent with how every other nullable target is decoded, and we should resolve this in V3 where a breaking change is acceptable.
It was decided by the team that fixing this bug in v2.x would not align with semver. See GODRIVER-3969 for more details.
Definition of done
Decoding {"foo": null/undefined} into a struct field of type bson.Raw, bsoncore.Document, or bsoncore.Array yield nil with no error. The behavior needs to be consistent with null for bson.D/bson.M/map/slice/pointer. We should also update the migration guide.
Pitfalls
Not investigated