[GODRIVER-1183] BSON encoding/decoding behaviour not compliant with stdlib json decoder Created: 02/Jul/19 Updated: 09/Jul/19 Resolved: 09/Jul/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | BSON |
| Affects Version/s: | 1.0.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Daniel Mejia R | Assignee: | Emmanuel Eppinger (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Docker environment based on Debian Stretch with Go 1.12 |
||
| Attachments: |
|
| Description |
|
I've found that this behaviour could be related to the decoder used by BSON itself when dealing with embeded structs. Take a look for instance at the behaviour of the following: https://play.golang.org/p/OBbfb_6jPjH At the database you would expect to have
But instead I'm having
Which is counter-intuitive given the standard behaviour for embeded structs and json Decoding Is this an intended behaviour for Umarshaling/Marshaling or is this a bug? |
| Comments |
| Comment by Emmanuel Eppinger (Inactive) [ 09/Jul/19 ] |
|
Duplicates |