[GODRIVER-516] Add default codecs for most reflect.Kind types Created: 01/Aug/18  Updated: 07/Sep/18  Resolved: 07/Sep/18

Status: Closed
Project: Go Driver
Component/s: BSON
Affects Version/s: 0.0.10
Fix Version/s: 0.0.14

Type: Improvement Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Kristofer Brandow (Inactive)
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: BSON Encoder & Decoder Redesign

 Description   

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.



 Comments   
Comment by Githook User [ 07/Sep/18 ]

Author:

{'name': 'Kris Brandow', 'email': 'kris@mongodb.com', 'username': 'skriptble'}

Message: Add v2 of BSON encoder and decoder framework

GODRIVER-494
GODRIVER-495
GODRIVER-496
GODRIVER-497
GODRIVER-498
GODRIVER-499
GODRIVER-500
GODRIVER-501
GODRIVER-516

Change-Id: Ib28a1b564846438ab0f3f9c95c70cea1cb48c8fa
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/e608edc0d26d76fffef3a84a5dac0f0ff7b816f5

Generated at Thu Feb 08 08:34:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.