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

"bson.MarshalValue" does not support "any" value of "nil"

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • None

      The MarshalValue function returns an error if you try to marshal a value like var v any = nil, despite the same value marshaling correctly to BSON "null" when using Marshal.

      Check out an example using MarshalValue here. Check out an example using Marshal here.

      Definition of done:

      • Calling bson.MarshalValue(nil) returns type "bsontype.Null", an encoded BSON "null" value, and no error.

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: