aeson-deriving-0.1.0.0: data types for compositional, type-directed serialization

Safe HaskellNone
LanguageHaskell2010

Data.Aeson.Deriving.ModifyField

Synopsis

Documentation

newtype ModifyFieldIn (fieldName :: Symbol) fun a Source #

Modify the contents of a particular field while decoding.

Constructors

ModifyFieldIn a 
Instances
Generic (ModifyFieldIn fieldName fun a) Source # 
Instance details

Defined in Data.Aeson.Deriving.ModifyField

Associated Types

type Rep (ModifyFieldIn fieldName fun a) :: Type -> Type #

Methods

from :: ModifyFieldIn fieldName fun a -> Rep (ModifyFieldIn fieldName fun a) x #

to :: Rep (ModifyFieldIn fieldName fun a) x -> ModifyFieldIn fieldName fun a #

ToJSON a => ToJSON (ModifyFieldIn fieldName fun a) Source # 
Instance details

Defined in Data.Aeson.Deriving.ModifyField

Methods

toJSON :: ModifyFieldIn fieldName fun a -> Value #

toEncoding :: ModifyFieldIn fieldName fun a -> Encoding #

toJSONList :: [ModifyFieldIn fieldName fun a] -> Value #

toEncodingList :: [ModifyFieldIn fieldName fun a] -> Encoding #

(FromJSON a, KnownSymbol fieldName, KnownJSONFunction fun, LoopWarning (ModifyFieldIn fieldName fun) a) => FromJSON (ModifyFieldIn fieldName fun a) Source # 
Instance details

Defined in Data.Aeson.Deriving.ModifyField

Methods

parseJSON :: Value -> Parser (ModifyFieldIn fieldName fun a) #

parseJSONList :: Value -> Parser [ModifyFieldIn fieldName fun a] #

type Rep (ModifyFieldIn fieldName fun a) Source # 
Instance details

Defined in Data.Aeson.Deriving.ModifyField

type Rep (ModifyFieldIn fieldName fun a) = D1 (MetaData "ModifyFieldIn" "Data.Aeson.Deriving.ModifyField" "aeson-deriving-0.1.0.0-3xmXbSM6tvsATS9SnA5Dtq" True) (C1 (MetaCons "ModifyFieldIn" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))

newtype ModifyFieldOut (fieldName :: Symbol) fun a Source #

Modify the contents of a particular field while encoding.

Constructors

ModifyFieldOut a 
Instances
Generic (ModifyFieldOut fieldName fun a) Source # 
Instance details

Defined in Data.Aeson.Deriving.ModifyField

Associated Types

type Rep (ModifyFieldOut fieldName fun a) :: Type -> Type #

Methods

from :: ModifyFieldOut fieldName fun a -> Rep (ModifyFieldOut fieldName fun a) x #

to :: Rep (ModifyFieldOut fieldName fun a) x -> ModifyFieldOut fieldName fun a #

(ToJSON a, KnownSymbol fieldName, KnownJSONFunction fun, LoopWarning (ModifyFieldOut fieldName fun) a) => ToJSON (ModifyFieldOut fieldName fun a) Source # 
Instance details

Defined in Data.Aeson.Deriving.ModifyField

Methods

toJSON :: ModifyFieldOut fieldName fun a -> Value #

toEncoding :: ModifyFieldOut fieldName fun a -> Encoding #

toJSONList :: [ModifyFieldOut fieldName fun a] -> Value #

toEncodingList :: [ModifyFieldOut fieldName fun a] -> Encoding #

FromJSON a => FromJSON (ModifyFieldOut fieldName fun a) Source # 
Instance details

Defined in Data.Aeson.Deriving.ModifyField

Methods

parseJSON :: Value -> Parser (ModifyFieldOut fieldName fun a) #

parseJSONList :: Value -> Parser [ModifyFieldOut fieldName fun a] #

type Rep (ModifyFieldOut fieldName fun a) Source # 
Instance details

Defined in Data.Aeson.Deriving.ModifyField

type Rep (ModifyFieldOut fieldName fun a) = D1 (MetaData "ModifyFieldOut" "Data.Aeson.Deriving.ModifyField" "aeson-deriving-0.1.0.0-3xmXbSM6tvsATS9SnA5Dtq" True) (C1 (MetaCons "ModifyFieldOut" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))

newtype RemapTextField fieldName haskVal jsonVal a Source #

Constructors

RemapTextField (ModifyFieldOut fieldName (haskVal ==> jsonVal) (ModifyFieldIn fieldName (jsonVal ==> haskVal) a)) 
Instances
(LoopWarning (ModifyFieldOut fieldName (haskVal ==> jsonVal)) a, ToJSON a, KnownSymbol fieldName, KnownJSON haskVal, KnownJSON jsonVal) => ToJSON (RemapTextField fieldName haskVal jsonVal a) Source # 
Instance details

Defined in Data.Aeson.Deriving.ModifyField

Methods

toJSON :: RemapTextField fieldName haskVal jsonVal a -> Value #

toEncoding :: RemapTextField fieldName haskVal jsonVal a -> Encoding #

toJSONList :: [RemapTextField fieldName haskVal jsonVal a] -> Value #

toEncodingList :: [RemapTextField fieldName haskVal jsonVal a] -> Encoding #

(LoopWarning (ModifyFieldIn fieldName (jsonVal ==> haskVal)) a, FromJSON a, KnownSymbol fieldName, KnownJSON jsonVal, KnownJSON haskVal) => FromJSON (RemapTextField fieldName haskVal jsonVal a) Source # 
Instance details

Defined in Data.Aeson.Deriving.ModifyField

Methods

parseJSON :: Value -> Parser (RemapTextField fieldName haskVal jsonVal a) #

parseJSONList :: Value -> Parser [RemapTextField fieldName haskVal jsonVal a] #