Currently, cbor.Marshaler interface matches json.Marshaler to make it easier for users familiar with encoding/json package.
type Marshaler interface {
MarshalCBOR() ([]byte, error)
}
However, this also inherits the limitations from matching those interfaces, as already noted in comments and discussions at:
For example, the proposed new API for encoding/json/v2 includes MarshalerV2 or MarshalerTo, etc.
Similarly for this library, a new alternative to Marshaler interface can address known limitations of the old API.