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

Add a switch for erring when unknown fields are present whilst decoding

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      Many times, I'd like to only allow fields that are defined in my Struct. Rather than defining an Extra map[string]interface{} `bson:",inline,omitempty" for every struct and then check to see if it's empty, the driver should be able to return an error when it doesn't have any place to put a field.

      Attachments

        Activity

          People

            Unassigned Unassigned
            craig.wilson@mongodb.com Craig Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: