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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Unassigned
            Reporter:
            Craig Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: