Safe Haskell | None |
---|
Provides functions to serialize CBOR encoded values to/from ByteStrings.
Warning, this package is very alpha quality right now. I've attempted to implement a useful subset of the CBOR standard, but the interface is still being refined and subject to change. Do not use this for anything important!
- data CBOR
- = CBOR_UInt Integer
- | CBOR_SInt Integer
- | CBOR_BS ByteString
- | CBOR_TS ByteString
- | CBOR_Array [CBOR]
- | CBOR_Map [(CBOR, CBOR)]
- | CBOR_Tag Integer CBOR
- | CBOR_HalfFloat HalfFloat
- | CBOR_Float Float
- | CBOR_Double Double
- | CBOR_NULL
- | CBOR_Undefined
- | CBOR_Reserved Int
- | CBOR_Unassigned Int
- | CBOR_True
- | CBOR_False
- | CBOR_Byte Word8
- | CBOR_Stop
- newtype HalfFloat = HF Word16
Documentation
Data type for CBOR values
CBOR_UInt Integer | |
CBOR_SInt Integer | |
CBOR_BS ByteString | |
CBOR_TS ByteString | TextString. This SHOULD be a UTF8 string if the spec is being followed. |
CBOR_Array [CBOR] | |
CBOR_Map [(CBOR, CBOR)] | |
CBOR_Tag Integer CBOR | |
CBOR_HalfFloat HalfFloat | N.B. Currently stored as an opaque value because I can't be bothered to implement my own half width float type. |
CBOR_Float Float | |
CBOR_Double Double | |
CBOR_NULL | |
CBOR_Undefined | Undefined as per the CBOR specification, a value of this type will usually represent a serializatoin error. |
CBOR_Reserved Int | Reserved, you probably shouldn't see any of these. |
CBOR_Unassigned Int | Unassigned |
CBOR_True | |
CBOR_False | |
CBOR_Byte Word8 | |
CBOR_Stop | Stop marker for indefinite encoding scheme |