Safe Haskell | None |
---|---|
Language | Haskell98 |
JWS, JWE and some related specifications provide for "compact" representations of certain types. This module defines classes and functions for working with such data.
- class FromCompact a where
- decodeCompact :: FromCompact a => ByteString -> Either Error a
- class ToCompact a where
- encodeCompact :: ToCompact a => a -> Either Error ByteString
Documentation
class FromCompact a where Source #
Data that can be parsed from a compact representation.
fromCompact :: [ByteString] -> Either Error a Source #
decodeCompact :: FromCompact a => ByteString -> Either Error a Source #
Decode a compact representation.
encodeCompact :: ToCompact a => a -> Either Error ByteString Source #
Encode data to a compact representation.