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

Design and write first-draft of bson.Decoder

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 0.0.1
    • None
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: