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

LTS Haskell 22.29:
Stackage Nightly 2024-07-19:
Latest on Hackage:

See all snapshots bson appears in

Apache-2.0 licensed by Tony Hannan
Maintained by Fedor Gogolev, Greg Weber
This version can be pinned in stack with:bson-,2834

Module documentation for

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.

[] - 2020-03-22


  • MonadFail usage

[] - 2020-02-08


  • Compatibility with GHC 8.8

[] - 2019-06-13


  • Compatibility with network 3

[] - 2018-12-17


  • Fix compilation on GHC < 7.10

[] - 2018-05-14


  • Simple deprecated types: 0x0C and 0x06

[0.3.2] - 2015-10-28


  • Old binary UUID subtype.