Download Latest Version bson-7.2.0.tgz (372.8 kB)
Email in envelope

Get an email when there's a new version of BSON parser

Home / v7.2.0
Name Modified Size InfoDownloads / Week
Parent folder
bson-7.2.0.tgz 2026-02-03 372.8 kB
bson-7.2.0.tgz.sig 2026-02-03 833 Bytes
README.md 2026-02-03 1.6 kB
v7.2.0 source code.tar.gz 2026-02-03 5.5 MB
v7.2.0 source code.zip 2026-02-03 5.6 MB
Totals: 5 Items   11.5 MB 0

7.2.0 (2026-01-29)

The MongoDB Node.js team is pleased to announce version 7.2.0 of the bson package!

Release Notes

EJSON now supports ignoreUndefined

serialize supports an option, ignoreUndefined, which instructs the serializer to skip any keys whose values are undefined.

This option has been added to EJSON:

:::typescript
> EJSON.stringify({ a: undefined }, { ignoreUndefined: true });
'{}'
> EJSON.stringify({ a: undefined }, { ignoreUndefined: false });
'{"a":null}'
> EJSON.serialize({ a: undefined }, { ignoreUndefined: true });
{}
> EJSON.serialize({ a: undefined }, { ignoreUndefined: false });
{ a: null }

This option defaults to false.

Buffer.copy() now present in ByteUtils

ByteUtils now contains a copy() method, we behaves identically to Nodejs' Buffer.copy() method.

Features

  • NODE-7328: Add ignoreUndefined option to EJSON APIs (#853) (5cf00c2)
  • NODE-7414: add copy method to ByteUtils (#867) (ffa77c6)

Documentation

We invite you to try the bson library immediately, and report any issues to the NODE project.

Source: README.md, updated 2026-02-03