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

Need to be able to unmarshall to bson.D field within a struct

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 1.3.0
    • None
    • None

    Description

      One of the data types in the tools resembles this:

      noformat
      type foo struct

      { Bar *bson.D }

      noformat

      Even with the Stitch-based patches to mgo/bson, this fails unmarshaling with the error "reflect.MakeSlice of non-slice type".

      (N.B. Changing the Bar field to *bson.M works.)

      This ticket is a reminder that after the planned changes to the BSON encoder and mgobson, we need this particular use case to work to help users who want to use mgobson as a stepping stone converting to the Go driver.

      Attachments

        Issue Links

          Activity

            People

              isabella.siu@mongodb.com Isabella Siu (Inactive)
              david.golden@mongodb.com David Golden
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: