-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 0.0.10
-
Component/s: BSON
-
None
The v1 Encoder and Decoder types do not have a way to handle encoding and decoding to known base kinds. If a user implements a type on top of an int64, the Encoder will be able to encode the value but the Decoder will not be able to decode the value.
Update the Registry type to have a third internal registry that handles default Codec}}s for a {{reflect.Kind. This registry will replace the default struct, array/slice, and map Codec typess. Additionally, the registry should only return the default map Codec if the map's key type is a string.