[GODRIVER-1768] Incorrect docs for unmarshaling BSON Null to bson.M Created: 14/Oct/20  Updated: 28/Oct/23  Resolved: 02/Nov/20

Status: Closed
Project: Go Driver
Component/s: Documentation
Affects Version/s: 1.4.2
Fix Version/s: 1.4.3

Type: Bug Priority: Minor - P4
Reporter: David Golden Assignee: Isabella Siu (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Docs say:

When decoding BSON to a D or M, the following type mappings apply when unmarshalling:
...
19. BSON null unmarshals to a primitive.Null.

But if I create a bson.M with a bson.Null value (or &bson.Null), marshal it, then unmarshal it, I get back nil for the field instead of bson.Null.



 Comments   
Comment by Githook User [ 02/Nov/20 ]

Author:

{'name': 'Isabella Siu', 'email': 'isabella.siu@mongodb.com', 'username': 'iwysiu'}

Message: GODRIVER-1768 fix documentation for unmarshaling BSON Null into bson.D/M (#526)
Branch: release/1.4
https://github.com/mongodb/mongo-go-driver/commit/6be4c944b2b18c645ac8ebd026d68808ba59ba14

Comment by Githook User [ 02/Nov/20 ]

Author:

{'name': 'Isabella Siu', 'email': 'isabella.siu@mongodb.com', 'username': 'iwysiu'}

Message: GODRIVER-1768 fix documentation for unmarshaling BSON Null into bson.D/M (#526)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/7a653f46fccf1ffd8933dd202206b2c32395707f

Generated at Thu Feb 08 08:37:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.