Golang decode doesn't work with interfaces

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Gone away
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When unmarshaling objects in Go, you can't pass in an interface, however it works when unmarshaling json.

       

      ```

      type X interface {}

      type Y struct {}

       

      var z X

      z = &Y{}

       

      d.Decode(z) // works in json, not with bson.

      ```

       

      This is severely limiting for what we can do with the API

              Assignee:
              Matt Dale
              Reporter:
              Sean Teeling
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: