I have a document and an object below:
{
"_id" : ObjectId("5c7642f49bd4e700332e82ea"),
"name" : "Favorite",
"reg" : /^L0F1[a-zA-Z0-9]*$/m
}
type Test struct {
ID primitive.ObjectID `bson:"_id,omitempty" json:"id"`
Name string `bson:"name,omitempty" json:"name"`
}
When I unmarshal the document to my object, I got attempted to read bytes of unknown BSON type invalid error.
- is caused by
-
GODRIVER-893 bsonrw.valueReader skip does not properly skip regular expressions
-
- Closed
-