Safe Haskell | None |
---|---|
Language | Haskell2010 |
Aeson bridge for MessagePack
- toAeson :: Object -> Maybe Value
- fromAeson :: Value -> Object
- newtype AsMessagePack a = AsMessagePack {
- getAsMessagePack :: a
- newtype AsAeson a = AsAeson {
- getAsAeson :: a
- packAeson :: ToJSON a => a -> ByteString
- unpackAeson :: FromJSON a => ByteString -> Maybe a
- decodeMessagePack :: MessagePack a => ByteString -> Maybe a
- encodeMessagePack :: MessagePack a => a -> ByteString
Conversion functions
toAeson :: Object -> Maybe Value Source
Convert MessagePack Object to Aeson Value. If the value unable to convert, it returns Nothing
MessagePack instance for Aeson.Value
instance MessagePack Value
ToJSON and FromJSON instance for MessagePack.Object
instance ToJSON Object instance FromJSON Object
Wrapper instances
newtype AsMessagePack a Source
Wrapper for using Aeson values as MessagePack value.
Functor AsMessagePack | |
Eq a => Eq (AsMessagePack a) | |
Data a => Data (AsMessagePack a) | |
Ord a => Ord (AsMessagePack a) | |
Read a => Read (AsMessagePack a) | |
Show a => Show (AsMessagePack a) | |
NFData a => NFData (AsMessagePack a) | |
(FromJSON a, ToJSON a) => MessagePack (AsMessagePack a) | |
Typeable (* -> *) AsMessagePack |
Wrapper for using MessagePack values as Aeson value.
AsAeson | |
|
Utility functions
packAeson :: ToJSON a => a -> ByteString Source
Pack Aeson value to MessagePack binary
unpackAeson :: FromJSON a => ByteString -> Maybe a Source
Unpack Aeson value from MessagePack binary
decodeMessagePack :: MessagePack a => ByteString -> Maybe a Source
Decode MessagePack value from JSON
encodeMessagePack :: MessagePack a => a -> ByteString Source
Encode MessagePack value to JSON