Skip to content
Binary serialisation in the CBOR format
Haskell Other
  1. Haskell 99.4%
  2. Other 0.6%
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
cbor-tool Changelog updates and version bumps Dec 3, 2019
cborg-json Changelog updates and version bumps Dec 3, 2019
cborg Changelog updates and version bumps Dec 3, 2019
demos demos: fix Simple.hs example Jul 18, 2018
.gitignore gitignore: update for .ghc.environment files Jul 18, 2018
.travis.yml Update tests for GHC-8.8 Oct 20, 2019
AUTHORS.txt Update AUTHORS.txt - Alex Mason email address Apr 25, 2018 Clean up README Jul 18, 2018
appveyor.yml appveyor: minor tweak Feb 25, 2016
cabal.project Update tests for GHC-8.8 Oct 20, 2019
nix-shell Add a 'nix-shell' script to quickly launch a dev environment Jul 18, 2018
stack.yaml Bump version to GHC 8.6 and lts-13.8 Feb 21, 2019

Fast binary serialisation and CBOR implementation for Haskell

Linux Build Status Hackage cborg version Hackage serialise version BSD3 Haskell

This repo contains two libraries (plus associated tools):

The serialise library is for serialising Haskell values and deserialising them later.

The cborg library provides a fast, standards-compliant implementation of the 'Concise Binary Object Representation' (specified in RFC 7049) for Haskell.

The serialise library uses the CBOR format, via the cborg library, which gives it the following benefits:

  • fast serialisation and deserialisation
  • compact binary format
  • stable format across platforms (32/64bit, big/little endian)
  • support for backwards compatible deserialisation with migrations
  • the ability to inspect binary values with generic tools, e.g. for debugging or recovery, including generic conversion into JSON text
  • potential to read the serialised format from other languages
  • incremental or streaming (de)serialisation
  • internal message framing (for use in network application)
  • suitable to use with untrusted input (resistance to asymmetric resource consumption attacks)


They are just a cabal install away on Hackage:

$ cabal install cborg serialise

There are also a few related packages that you may be interested in:

  • cborg-json implements the bijection between JSON and CBOR specified in the RFC.
  • cbor-tool is a handy command-line utility for working with CBOR data.

Join in

Be sure to read the contributing guidelines. File bugs in the GitHub issue tracker.

Master git repository:

  • git clone

The tests for the cborg package are currently included in the serialise package.

$ cabal test serialise


See AUTHORS.txt.


BSD3. See LICENSE.txt for the exact terms of copyright and redistribution.

You can’t perform that action at this time.