BSON

The BSON library comprehensively supports BSON, the data storage and network transfer format that MongoDB uses for “documents”. BSON, short for Binary JSON, is a binary-encoded serialization of JSON-like documents.

For everyday usage there are type aliases and companion objects available from the org.mongodb.scala.bson package.

  • Documents: Documentation of the driver’s support for BSON document representations
  • Extended JSON: Documentation of the driver’s support for MongoDB Extended JSON

For advanced usage you may need to use org.bson directly. See the core Java driver documentation for:

  • Readers and Writers: Documentation of the driver’s support for stream-based reading and writing of BSON documents
  • Codec and CodecRegistry: Documentation of the driver’s Codec API, an abstraction for producing and consuming BSON document representations using the stream-based readers and writers
On this page