serialise

A binary serialisation library for Haskell values.

https://github.com/well-typed/cborg

Version on this page:0.2.6.0@rev:3
LTS Haskell 22.39:0.2.6.1@rev:3
Stackage Nightly 2024-10-31:0.2.6.1@rev:3
Latest on Hackage:0.2.6.1@rev:3

See all snapshots serialise appears in

BSD-3-Clause licensed by Duncan Coutts
This version can be pinned in stack with:serialise-0.2.6.0@sha256:eba4aae0ae552e58c4e1f27186764551b98591e3bd92e852c40655e3b35924c9,8776

This package (formerly binary-serialise-cbor) provides pure, efficient serialization of Haskell values directly into ByteStrings for storage or transmission purposes. By providing a set of type class instances, you can also serialise any custom data type you have as well.

The underlying binary format used is the 'Concise Binary Object Representation', or CBOR, specified in RFC 7049. As a result, serialised Haskell values have implicit structure outside of the Haskell program itself, meaning they can be inspected or analyzed without custom tools.

An implementation of the standard bijection between CBOR and JSON is provided by the cborg-json package. Also see cbor-tool for a convenient command-line utility for working with CBOR data.

Changes

Revision history for serialise

0.2.6.0 – 2022-09-24

  • Support GHC 9.4

  • Drop GHC 8.0 and 8.2 support

0.2.4.0 – UNRELEASED

  • Add instances for Data.Void, strict and these.

0.2.3.0 – 2020-05-10

  • Bounds bumps and GHC 8.10 compatibility

0.2.2.0 – 2019-12-29

  • Export encodeContainerSkel, encodeMapSkel and decodeMapSkel from Codec.Serialise.Class

  • Fix Serialise instances for TypeRep and SomeTypeRep (#216)

  • Bounds bumps and GHC 8.8 compatibility

0.2.1.0 – 2018-10-11

  • Bounds bumps and GHC 8.6 compatibility

0.2.0.0 – 2017-11-30

  • Improved robustness in presence of invalid UTF-8 strings

  • Add encoders and decoders for ByteArray

  • Export GSerialiseProd(..) and GSerialiseSum(..)

0.1.0.0 – 2017-06-28

  • First version. Released on an unsuspecting world.