CBOR-0.1.0.1: Encode/Decode values to/from CBOR

Safe HaskellNone

Data.Binary.CBOR

Synopsis

Documentation

getCBOR :: Get CBORSource

Reads CBOR encoded data

>>> let x = LBS.pack [26,111,122,133,144]
>>> runGet getCBOR x
CBOR_UInt 1870300560

putCBOR :: CBOR -> PutSource

Writes CBOR encoded data

>>> let x = CBOR_Array [CBOR_UInt 42, CBOR_Float 3.14]
>>> LBS.unpack $ runPut (putCBOR x)
[130,24,42,250,64,72,245,195]