Closed
Description
It would be great if there was an option that excludes from resulting map[string]interface{}
the fields that were unmarshalled to the struct object, see the example below:
v := struct {
Foo string `json:"foo"`
Boo []int `json:"boo"`
}{}
result, err := marshmallow.Unmarshal([]byte(`{"foo":"bar","boo":[1,2,3],"goo":12.6}`), &v)
fmt.Printf("v=%+v, result=%+v, err=%v", v, result, err)
// Output: v={Foo:bar Boo:[1 2 3]}, result=map[goo:12.6], err=<nil>
// ^^^^^^ ^^^
// only "goo" field is present in result since "foo" and "boo" are explicitly typed