Users can provide a function to transcode an encoded CBOR data item to JSON. If provided, then
unmarshaling into a value whose type implements json.Unmarshaler, but not cbor.Unmarshaler, will
first transcode the input bytes to JSON and then invoke UnmarshalJSON on the destination value.
Signed-off-by: Ben Luddy <bluddy@redhat.com>
If the user provides a JSON-to-CBOR transcode function, a value whose type implements json.Marshaler
and not cbor.Marshaler will be encoded by first calling its MarshalJSON method, then transcoding the
result to CBOR.
Signed-off-by: Ben Luddy <bluddy@redhat.com>