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

Design and write first-draft of bson.Decoder

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.0.1
    • Affects Version/s: None
    • Component/s: None
    • None

      The bson.Decoder is responsible for decoding an io.Reader into the provided type.

      The steps are as follows:

      1. Read a full document into a slice of bytes
      2. Determine if the provided type implements the bson.Unmarshaler interface, if it does call the UnmarshalBSON method and we're done
      3. Reflect the type and determine the keys that will be filled in, using the struct name and available tags
      4. Iterate over the available elements and fill in the provided type. For any interface{} values encountered, place a *ReaderElement in that spot.

            Assignee:
            sam.rossi@mongodb.com Samuel Rossi (Inactive)
            Reporter:
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: