Safe Haskell | Safe-Inferred |
---|
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
- fromCompact :: [ByteString] -> Either String a
- decodeCompact :: FromCompact a => ByteString -> Either String a
- class ToCompact a where
- toCompact :: a -> Either String [ByteString]
- encodeCompact :: ToCompact a => a -> Either String ByteString
Documentation
class FromCompact a whereSource
Data that can be parsed from a compact representation.
fromCompact :: [ByteString] -> Either String aSource
decodeCompact :: FromCompact a => ByteString -> Either String aSource
Decode a compact representation.
Data that can be converted to a compact representation.
toCompact :: a -> Either String [ByteString]Source
encodeCompact :: ToCompact a => a -> Either String ByteStringSource
Encode data to a compact representation.