[GODRIVER-550] marshalling mode to ignore omitempty mode Created: 12/Sep/18 Updated: 17/Sep/18 Resolved: 17/Sep/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | BSON |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Sam Kleinman (Inactive) | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | evg | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I've been working on a go library read and write FTDC data using the new BSON library. It's great! I have found myself in a situation where I wanted to marshal a 3rd party struct that had omitempty tags, and I did not want the omitemtpy behavior so I had to modify the vendored code. It would be nice to toggle respect-omit empty rather than needing to modify the struct itself. |
| Comments |
| Comment by Kristofer Brandow (Inactive) [ 17/Sep/18 ] |
|
As discussed offline, the new StructTagParser will allow users to do this as necessary. Refer to the documentation for the bson package. |