[GODRIVER-2684] Deprecate "bson.D.Map" Created: 10/Dec/22 Updated: 28/Oct/23 Resolved: 05/Apr/23 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.12.0 |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Matt Dale | Assignee: | Matt Dale |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Epic Link: | Go Driver 2.0 Prep | ||||||||||||||||||||
| Quarter: | FY24Q1 | ||||||||||||||||||||
| Documentation Changes: | Not Needed | ||||||||||||||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||||||||||||||
| Description |
|
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:
|
| Comments |
| Comment by Githook User [ 05/Apr/23 ] |
|
Author: {'name': 'Matt Dale', 'email': '9760375+matthewdale@users.noreply.github.com', 'username': 'matthewdale'}Message: |
| Comment by Matt Dale [ 03/Apr/23 ] |