A standalone BSON library for Go, extracted from the official MongoDB Go driver (mongodb/mongo-go-driver) so it can be used without depending on the full driver.
import "github.com/numbergroup/bson"| Package | Upstream source |
|---|---|
github.com/numbergroup/bson |
go.mongodb.org/mongo-driver/v2/bson |
github.com/numbergroup/bson/bsoncore |
go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore |
github.com/numbergroup/bson/mgocompat |
go.mongodb.org/mongo-driver/v2/bson/mgocompat |
github.com/numbergroup/bson/internal/* |
go.mongodb.org/mongo-driver/v2/internal/* (only the packages bson needs) |
testdata/specifications holds the BSON corpus, binary-vector, and benchmark
fixtures from mongodb/specifications
used by the spec tests.
- mongo-go-driver commit
15721d026d8b8d092396fd05da0ea5b644fa94c9(2026-11-12) - specifications commit
775c4bce1bfe1c409b947eae1f3eab6975fccfe3
The only changes from upstream are import-path rewrites, gofmt import ordering, and
the benchmark fixture path. The API is otherwise identical to the driver's bson package.
Apache License 2.0. See LICENSE and THIRD-PARTY-NOTICES.