smash-aeson-0.1.0.0: Aeson support for the smash library
Copyright(c) 2020 Emily Pillmore
LicenseBSD-3-Clause
MaintainerEmily Pillmore <emilypi@cohomolo.gy>
StabilityExperimental
PortabilityCPP
Safe HaskellNone
LanguageHaskell2010

Data.Smash.Aeson

Description

This module contains the Aeson instances for the Smash datatype. The Smash instances, explicitly naming the tuple entries using SmashL and SmashR

Orphan instances

FromJSON2 Smash Source # 
Instance details

Methods

liftParseJSON2 :: (Value -> Parser a) -> (Value -> Parser [a]) -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser (Smash a b)

liftParseJSONList2 :: (Value -> Parser a) -> (Value -> Parser [a]) -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser [Smash a b]

ToJSON2 Smash Source # 
Instance details

Methods

liftToJSON2 :: (a -> Value) -> ([a] -> Value) -> (b -> Value) -> ([b] -> Value) -> Smash a b -> Value

liftToJSONList2 :: (a -> Value) -> ([a] -> Value) -> (b -> Value) -> ([b] -> Value) -> [Smash a b] -> Value

liftToEncoding2 :: (a -> Encoding) -> ([a] -> Encoding) -> (b -> Encoding) -> ([b] -> Encoding) -> Smash a b -> Encoding

liftToEncodingList2 :: (a -> Encoding) -> ([a] -> Encoding) -> (b -> Encoding) -> ([b] -> Encoding) -> [Smash a b] -> Encoding

FromJSON a => FromJSON1 (Smash a) Source # 
Instance details

Methods

liftParseJSON :: (Value -> Parser a0) -> (Value -> Parser [a0]) -> Value -> Parser (Smash a a0)

liftParseJSONList :: (Value -> Parser a0) -> (Value -> Parser [a0]) -> Value -> Parser [Smash a a0]

ToJSON a => ToJSON1 (Smash a) Source # 
Instance details

Methods

liftToJSON :: (a0 -> Value) -> ([a0] -> Value) -> Smash a a0 -> Value

liftToJSONList :: (a0 -> Value) -> ([a0] -> Value) -> [Smash a a0] -> Value

liftToEncoding :: (a0 -> Encoding) -> ([a0] -> Encoding) -> Smash a a0 -> Encoding

liftToEncodingList :: (a0 -> Encoding) -> ([a0] -> Encoding) -> [Smash a a0] -> Encoding

(FromJSON a, FromJSON b) => FromJSON (Smash a b) Source # 
Instance details

Methods

parseJSON :: Value -> Parser (Smash a b)

parseJSONList :: Value -> Parser [Smash a b]

(ToJSON a, ToJSON b) => ToJSON (Smash a b) Source # 
Instance details

Methods

toJSON :: Smash a b -> Value

toEncoding :: Smash a b -> Encoding

toJSONList :: [Smash a b] -> Value

toEncodingList :: [Smash a b] -> Encoding