https://github.com/mongodb/bson-ruby
Ruby Implementation of the BSON Specification (2.0.0+)
https://github.com/mongodb/bson-ruby
Keywords
mongodb ruby
Keywords from Contributors
mongodb-driver orm-framework activerecord nosql mvc activejob rubygems rspec crash-reporting rack
Last synced: about 2 hours ago
JSON representation
Repository metadata
Ruby Implementation of the BSON Specification (2.0.0+)
- Host: GitHub
- URL: https://github.com/mongodb/bson-ruby
- Owner: mongodb
- License: apache-2.0
- Created: 2013-04-12T09:01:30.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2026-01-08T18:38:48.000Z (about 2 months ago)
- Last Synced: 2026-02-28T05:57:49.446Z (3 days ago)
- Topics: mongodb, ruby
- Language: Ruby
- Homepage: http://bsonspec.org
- Size: 2.24 MB
- Stars: 82
- Watchers: 37
- Forks: 111
- Open Issues: 3
- Releases: 45
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Notice: NOTICE
README.md
BSON


An implementation of the BSON specification in Ruby.
Installation
BSON can be installed via RubyGems:
> gem install bson
Or by adding it to your project's Gemfile:
gem 'bson'
Release Integrity
Each release of the BSON library for Ruby after version 5.0.0 has been automatically built and signed using the team's GPG key.
To verify the bson gem file:
- Download the GPG key.
- Import the key into your GPG keyring with
gpg --import ruby-driver.asc. - Download the gem file (if you don't already have it). You can download it from RubyGems with
gem fetch bson, or you can download it from the releases page on GitHub. - Download the corresponding detached signature file from the same release. Look at the bottom of the release that corresponds to the gem file, under the 'Assets' list, for a
.sigfile with the same version number as the gem you wish to install. - Verify the gem with
gpg --verify bson-X.Y.Z.gem.sig bson-X.Y.Z.gem(replacingX.Y.Zwith the actual version number).
You are looking for text like "Good signature from "MongoDB Ruby Driver Release Signing Key packaging@mongodb.com" in the output. If you see that, the signature was found to correspond to the given gem file.
(Note that other output, like "This key is not certified with a trusted signature!", is related to web of trust and depends on how strongly you, personally, trust the ruby-driver.asc key that you downloaded from us. To learn more, see https://www.gnupg.org/gph/en/manual/x334.html)
Why not use RubyGems' gem-signing functionality?
RubyGems' own gem signing is problematic, most significantly because there is no established chain of trust related to the keys used to sign gems. RubyGems' own documentation admits that "this method of signing gems is not widely used" (see https://guides.rubygems.org/security/). Discussions about this in the RubyGems community have been off-and-on for more than a decade, and while a solution will eventually arrive, we have settled on using GPG instead for the following reasons:
- Many of the other driver teams at MongoDB are using GPG to sign their product releases. Consistency with the other teams means that we can reuse existing tooling for our own product releases.
- GPG is widely available and has existing tools and procedures for dealing with web of trust (though they are admittedly quite arcane and intimidating to the uninitiated, unfortunately).
Ultimately, most users do not bother to verify gems, and will not be impacted by our choice of GPG over RubyGems' native method.
Compatibility
BSON is tested against MRI (2.7+) and JRuby (9.3+).
Documentation
Current documentation can be found
here.
API Documentation
The API Documentation is
located at mongodb.com/docs.
BSON Specification
The BSON specification is at bsonspec.org.
Bugs & Feature Requests
To report a bug in the bson gem or request a feature:
- Visit our issue tracker and login
(or create an account if you do not have one already). - Navigate to the RUBY project.
- Click 'Create Issue' and fill out all of the applicable form fields, making
sure to selectBSONin the Component/s field.
When creating an issue, please keep in mind that all information in JIRA
for the RUBY project, as well as the core server (the SERVER project),
is publicly visible.
PLEASE DO:
- Provide as much information as possible about the issue.
- Provide detailed steps for reproducing the issue.
- Provide any applicable code snippets, stack traces and log data.
- Specify version numbers of the
bsongem and/or Ruby driver and MongoDB
server.
PLEASE DO NOT:
- Provide any sensitive data or server logs.
- Report potential security issues publicly (see 'Security Issues' below).
Security Issues
If you have identified a potential security-related issue in the bson gem
(or any other MongoDB product), please report it by following the
instructions here.
Product Feature Requests
To request a feature which is not specific to the bson gem, or which
affects more than the bson gem and/or Ruby driver alone (for example, a
feature which requires MongoDB server support), please submit your idea through
the MongoDB Feedback Forum.
Maintenance and Bug Fix Policy
New library functionality is generally added in a backwards-compatible manner
and results in new minor releases. Bug fixes are generally made on
master first and are backported to the current minor library release. Exceptions
may be made on a case-by-case basis, for example security fixes may be
backported to older stable branches. Only the most recent minor release
is officially supported. Customers should use the most recent release in
their applications.
Versioning
As of 2.0.0, this project adheres to the
Semantic Versioning Specification.
License
Copyright (C) 2009-2020 MongoDB Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Owner metadata
- Name: mongodb
- Login: mongodb
- Email: iteng@mongodb.com
- Kind: organization
- Description:
- Website: http://www.mongodb.com/
- Location: United States of America
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/45120?v=4
- Repositories: 273
- Last ynced at: 2025-04-05T00:02:27.902Z
- Profile URL: https://github.com/mongodb
GitHub Events
Total
- Create event: 4
- Commit comment event: 1
- Release event: 3
- Watch event: 3
- Delete event: 1
- Issue comment event: 21
- Push event: 17
- Pull request review comment event: 2
- Pull request review event: 27
- Pull request event: 31
- Fork event: 7
Last Year
- Create event: 3
- Commit comment event: 1
- Release event: 2
- Watch event: 2
- Delete event: 1
- Issue comment event: 18
- Push event: 13
- Pull request review event: 25
- Pull request review comment event: 2
- Pull request event: 23
- Fork event: 4
Committers metadata
Last synced: 2 days ago
Total Commits: 1,257
Total Committers: 80
Avg Commits per committer: 15.713
Development Distribution Score (DDS): 0.531
Commits in past year: 20
Committers in past year: 9
Avg Commits per committer in past year: 2.222
Development Distribution Score (DDS) in past year: 0.55
| Name | Commits | |
|---|---|---|
| Durran Jordan | d****n@g****m | 589 |
| Emily | e****y@m****m | 131 |
| Oleg Pudeyev | 3****o | 113 |
| Tyler Brock | t****k@g****m | 67 |
| Frederick Cheung | f****g@g****m | 42 |
| Jamis Buck | j****k@g****m | 32 |
| Oleg Pudeyev | o****g@b****m | 32 |
| Gary Murakami | g****i@1****m | 30 |
| Neil Shweky | n****y@g****m | 28 |
| Sam Kleinman | s****k@1****m | 22 |
| Bob Grabar | b****r@1****m | 21 |
| Brandon Black | b****k@g****m | 16 |
| Dmitry Rybakov | d****v@m****m | 11 |
| Johnny Shields | j****s@g****m | 9 |
| Emily Giurleo | e****o@g****m | 8 |
| tycho garen | g****n@t****m | 6 |
| Alex Bevilacqua | a****x@a****m | 6 |
| kay | k****m@1****m | 6 |
| Mario Alvarez | m****z@1****m | 4 |
| Jun Aruga | j****a | 3 |
| Saghm Rossi | s****i@g****m | 3 |
| Pavel Rosický | p****k@s****z | 3 |
| Michael Sell | m****l@g****m | 3 |
| Jorge Puente Sarrín | p****n@g****m | 3 |
| Brian Samek | b****k@m****m | 2 |
| Krzysztof Knapik | k****o@k****t | 2 |
| MSP-Greg | M****g | 2 |
| Mario Uher | u****o@g****m | 2 |
| Michał Begejowicz | m****z@g****m | 2 |
| Agis Anastasopoulos | a****s@s****r | 2 |
| and 50 more... | ||
Committer domains:
- 10gen.com: 7
- mongodb.com: 5
- bsdpower.com: 1
- tychoish.com: 1
- alexbevi.com: 1
- seznam.cz: 1
- knapo.net: 1
- skroutz.gr: 1
- dimelo.com: 1
- realself.com: 1
- weblinc.com: 1
- ip-10-32-87-233.ec2.internal: 1
- smashingboxes.com: 1
- herimedia.com: 1
- ruby-lang.org: 1
- trippett.org: 1
- bamaru.de: 1
- s21g.com: 1
- 80beans.com: 1
- qq.com: 1
- seas.upenn.edu: 1
- adamwrobel.com: 1
- protonmail.ch: 1
- alethearose.com: 1
- loggator.com: 1
- heli.pet: 1
- sensortower.com: 1
- uk.ibm.com: 1
- greiz-reinsdorf.de: 1
- fedoraproject.org: 1
Issue and Pull Request metadata
Last synced: about 2 months ago
Total issues: 0
Total pull requests: 187
Average time to close issues: N/A
Average time to close pull requests: 14 days
Total issue authors: 0
Total pull request authors: 24
Average comments per issue: 0
Average comments per pull request: 0.78
Merged pull request: 156
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 34
Past year average time to close issues: N/A
Past year average time to close pull requests: 4 days
Past year issue authors: 0
Past year pull request authors: 8
Past year average comments per issue: 0
Past year average comments per pull request: 0.97
Past year merged pull request: 23
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
Top Pull Request Authors
- jamis (49)
- p-mongo (33)
- Neilshweky (32)
- johnnyshields (24)
- alexbevi (8)
- comandeo-mongo (8)
- comandeo (5)
- ahorek (3)
- MSP-Greg (3)
- IvanTakarlikov-st (2)
- midnight-wonderer (2)
- zacheryph (2)
- donoghuc (2)
- mtasaka (2)
- alcaeus (2)
Top Issue Labels
Top Pull Request Labels
- release-candidate (6)
- bug (5)
- oleg-responded (2)
- feature (2)
- oleg-done (1)
- oleg-check (1)
- tracked-in-jira (1)
Package metadata
- Total packages: 3
-
Total downloads:
- rubygems: 224,694,017 total
- Total docker downloads: 196,661,220
- Total dependent packages: 163 (may contain duplicates)
- Total dependent repositories: 19,387 (may contain duplicates)
- Total versions: 620
- Total maintainers: 2
- Total advisories: 2
gem.coop: bson
A fully featured BSON specification implementation in Ruby
- Homepage: https://www.mongodb.com/docs/ruby-driver/current/tutorials/bson-v4/
- Documentation: http://www.rubydoc.info/gems/bson/
- Licenses: Apache-2.0
- Latest release: 5.2.0 (published 5 months ago)
- Last Synced: 2026-03-01T13:01:35.819Z (2 days ago)
- Versions: 274
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 112,598,676 Total
- Docker Downloads: 98,330,610
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.075%
- Downloads: 0.226%
- Maintainers (2)
rubygems.org: bson
A fully featured BSON specification implementation in Ruby
- Homepage: https://www.mongodb.com/docs/ruby-driver/current/tutorials/bson-v4/
- Documentation: http://www.rubydoc.info/gems/bson/
- Licenses: Apache-2.0
- Latest release: 5.2.0 (published 5 months ago)
- Last Synced: 2026-02-11T14:39:25.026Z (20 days ago)
- Versions: 279
- Dependent Packages: 163
- Dependent Repositories: 19,387
- Downloads: 112,095,341 Total
- Docker Downloads: 98,330,610
-
Rankings:
- Downloads: 0.202%
- Dependent packages count: 0.214%
- Dependent repos count: 0.26%
- Docker downloads count: 0.673%
- Average: 1.68%
- Forks count: 2.542%
- Stargazers count: 6.186%
- Maintainers (2)
- Advisories:
proxy.golang.org: github.com/mongodb/bson-ruby
- Homepage:
- Documentation: https://pkg.go.dev/github.com/mongodb/bson-ruby#section-documentation
- Licenses: apache-2.0
- Latest release: v5.2.0+incompatible (published 5 months ago)
- Last Synced: 2026-02-24T09:12:56.338Z (7 days ago)
- Versions: 67
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.48%
- Average: 5.664%
- Dependent repos count: 5.848%
Dependencies
- actions/checkout v2 composite
- ruby/setup-ruby v1 composite
- debian 9 build
- debian 10 build
- activesupport < 7.1 development
- byebug >= 0 development
- fuubar >= 0 development
- json >= 0 development
- rake >= 0 development
- rake-compiler >= 0 development
- rfc >= 0 development
- rspec ~> 3 development
- rubocop ~> 1.45.1 development
- rubocop-performance ~> 1.16.0 development
- rubocop-rake ~> 0.6.0 development
- rubocop-rspec ~> 2.18.1 development
- ruby-debug >= 0 development
- ruby-prof >= 0 development
- yard >= 0 development
Score: 28.683712882842094