[GODRIVER-1804] Investigate encoding/json tagged behavior Created: 01/Dec/20 Updated: 30/Mar/22 |
|
| Status: | Backlog |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Isabella Siu (Inactive) | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Look at how encoding/json handles tags and figure out how to incorporate that into bson. For example, if two fields map to the same name and one of them does so through json tags, the tagged field is used. |
| Comments |
| Comment by Isabella Siu (Inactive) [ 08/Dec/20 ] | ||||
|
For example, the struct:
would be marshaled by encoding/json to {"A":20}, while bson would error with "duplicated key a" |