Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype ModifyFieldIn (fieldName :: Symbol) fun a = ModifyFieldIn a
- newtype ModifyFieldOut (fieldName :: Symbol) fun a = ModifyFieldOut a
- newtype RemapTextField fieldName haskVal jsonVal a = RemapTextField (ModifyFieldOut fieldName (haskVal ==> jsonVal) (ModifyFieldIn fieldName (jsonVal ==> haskVal) a))
Documentation
newtype ModifyFieldIn (fieldName :: Symbol) fun a Source #
Modify the contents of a particular field while decoding.
Instances
newtype ModifyFieldOut (fieldName :: Symbol) fun a Source #
Modify the contents of a particular field while encoding.
Instances
newtype RemapTextField fieldName haskVal jsonVal a Source #
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 # | |
Defined in Data.Aeson.Deriving.ModifyField 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 # | |
Defined in Data.Aeson.Deriving.ModifyField parseJSON :: Value -> Parser (RemapTextField fieldName haskVal jsonVal a) # parseJSONList :: Value -> Parser [RemapTextField fieldName haskVal jsonVal a] # |