-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
-
Using the bson.D.Map method often results in unexpected output because the method only shallow-converts the D to an M. Updating the method to recursively convert a D to an M requires a lot of reflection logic and would be a backward-breaking behavior change in Go Driver 1.x. The only use case for converting a D to an M that we have observed it to marshal the D to an intuitive JSON representation (i.e. key-value instead of an array of tuples). In Go Driver 2.0, encoding to the intuitive JSON representation will be supported natively (see GODRIVER-1765), so the Map method will have no known use cases.
Definition of done:
- Deprecate bson.D.Map. Recommend that users marshal a bson.D as BSON and unmarshal it as a bson.M to achieve the same D-to-M conversion.
- is depended on by
-
GODRIVER-2617 Remove or un-export all currently deprecated code in Go Driver 2.0
- Closed
- is related to
-
GODRIVER-2141 Add a recursive option to Map()
- Closed
- related to
-
GODRIVER-2606 Deprecate unused functionality in preparation to remove it in Go Driver 2.0
- Closed