Binary serialisation in the CBOR format
Clone or download
dcoutts Merge pull request #189 from well-typed/wip/testsuite-canonical
Major testsuite improvements, including canonical form tests
Latest commit e352b0e Nov 30, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Move to .github for cleanup May 4, 2017
.travis Replace dragon bureaucrat's flames with a teacup. Jul 19, 2017
binary-serialise-cbor Bump versions Oct 11, 2018
cbor-tool Bump versions Oct 11, 2018
cborg-json Bump versions Oct 11, 2018
cborg Drop use of TypeApplications in the tests Nov 26, 2018
serialise Improve ghc version compatability in serialise tests Nov 27, 2018
.gitignore gitignore: update for .ghc.environment files Jul 18, 2018
.travis.yml GHC 8.6 compatibility. Sep 23, 2018
AUTHORS.txt Update AUTHORS.txt - Alex Mason email address Apr 25, 2018
cabal.project cabal.project: make the packages list more readable Jul 18, 2018
nix-shell Add a 'nix-shell' script to quickly launch a dev environment Jul 18, 2018
stack.yaml Add cbor-json to stack.yaml Jul 25, 2017

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.