if an ObjectID is part of a struct and this struct gets marshalled into json it gets converted into an array of integers, which is in line with the specification for json marshalling for an array of bytes. When the bytes are umnarshalled calling json.Unmarshal, however, the objectid.UnmarshalJSON method is called, which errors cause of the following lines:
m := make(map[string]string)
err := json.Unmarshal(b, &m)
if err != nil
from line 85 of bson/objectid/objectid.go
- is caused by
-
GODRIVER-590 objectid.ObjectID should support regular JSON hex bytes
- Closed