Docs Menu
Docs Home
/ / /
Scala

BSON Implementation

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. To learn more, see the API documentation for the Scala BSON implementation.

The following sections describe aspects of the driver's BSON implementation:

  • Documents: describes the driver’s support for BSON document representations

  • Macros: describes the case classes you can use to represent documents in a collection

  • Extended JSON: describes the driver’s support for MongoDB Extended JSON

For advanced usage you might need to use org.bson directly. See the Java Sync driver documentation to learn about the following topics:

  • Readers and Writers: describes the driver’s support for stream-based reading and writing of BSON documents

  • Codec and CodecRegistry: describes the driver’s Codec API, an abstraction for producing and consuming BSON document representations using the stream-based readers and writers

Back

Observables

Next

Documents