Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1768

Incorrect docs for unmarshaling BSON Null to bson.M

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.2
    • Fix Version/s: 1.4.3
    • Component/s: Documentation
    • Security Level: Public
    • Labels:
      None

      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.

        Attachments

          Activity

            People

            Assignee:
            isabella.siu Isabella Siu
            Reporter:
            david.golden David Golden
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: