[GODRIVER-953] way to force decoding ints into string Created: 10/Apr/19 Updated: 27/Oct/23 Resolved: 30/Mar/20 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | BSON |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Alexander | Assignee: | Isabella Siu (Inactive) |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | mgocompat | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Epic Link: | mgo migration tool | ||||||||||||
| Description |
|
I have following field in struct:
Sometimes value of this map is numberLong and got an error:
With mgo driver this case is ok, but in official driver I can't load this collection at all. |
| Comments |
| Comment by Isabella Siu (Inactive) [ 15/Jan/20 ] | ||
|
Hi abonec, What version of mgo are you using? The globalsign fork of it does not decode 64-bit integers into strings, it just skips it silently. | ||
| Comment by Alexander [ 10/Apr/19 ] | ||
|
But it would be strings and ints. It would be great if there will be an option to force convert to the target type. | ||
| Comment by generalking [ 10/Apr/19 ] | ||
|
you should define like this
|