BSON documents are JSON-like objects with a standard binary encoding.

Version on this page:
LTS Haskell 16.3:
Stackage Nightly 2020-06-29:
Latest on Hackage:

See all snapshots bson appears in

LicenseRef-OtherLicense licensed by Tony Hannan
Maintained by Fedor Gogolev, Greg Weber

Module documentation for

This version can be pinned in stack with:[email protected]:e6f785ed48ac1d5457d86960dc372537b45e8ebd60e8162202ccb2fe885321a3,2427

A BSON Document is an untyped (dynamically type-checked) record. I.e. it is a list of name-value pairs, where a Value is a single sum type with constructors for basic types (Bool, Int, Float, String, and Time), compound types (List, and (embedded) Document), and special types (Binary, Javascript, ObjectId, RegEx, and a few others). A BSON Document is serialized to a standard binary encoding defined at This implements version 1 of that spec.


Change Log

All notable changes to this project will be documented in this file. This project adheres to Package Versioning Policy.

[0.3.2] - 2015-10-28


  • Old binary UUID subtype.