[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
Change-Id: Ib28a1b564846438ab0f3f9c95c70cea1cb48c8fa |