[GODRIVER-1644] Add a switch for erring when unknown fields are present whilst decoding Created: 11/Jun/20  Updated: 30/Mar/22

Status: Backlog
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Craig Wilson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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.


Generated at Thu Feb 08 08:36:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.