Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
No Release
-
None
-
go 1.11.1
Description
type User struct {
|
B string `bson:"b"`
|
C string `bson:"c,omitempty"`
|
}
|
|
|
func Test_UnmarshalB(t *testing.T) {
|
payload := `{"c": null, "b": "b"}`
|
internal := User{}
|
err := bson.UnmarshalExtJSON([]byte(payload), false, &internal)
|
t.Errorf("%#v %v", internal, err)
|
}
|
>>> mgdbugs.User{B:"", C:""} cannot decode null into a string type