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

Version on this page:
LTS Haskell 15.14:
Stackage Nightly 2020-05-26:
Latest on Hackage:

See all snapshots bson appears in

Apache-2.0 licensed by Tony Hannan
Maintained by Fedor Gogolev, Greg Weber

Module documentation for

This version can be pinned in stack with:[email protected]:407e90a23704ba5591ae724e5ba3e44089712a44dccb2894a997c176f04d9043,2493

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.

[] - 2018-05-14


  • Simple deprecated types: 0x0C and 0x06

[0.3.2] - 2015-10-28


  • Old binary UUID subtype.