Marshaller interface usage

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If I use the `Marshaller` interface on a type to output a slice, it fails with the following error :

      `WriteArray can only write a Array while positioned on a Element or Value but is positioned on a TopLevel`

      You can see this inĀ https://play.golang.org/p/Sc5Fk_ACvpB

      From what I investigated I understood that the call to `bson.Marshal` I do inside `MarshalBSON` thinks the slice is at top level and so refuse to marshal it. Is there an other way to marshal bson w/o that constraint ?

            Assignee:
            Divjot Arora (Inactive)
            Reporter:
            Thomas Bruyelle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: