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

Safe HaskellNone
LanguageHaskell2010

Data.Aeson.Deriving.WithConstantFields

Synopsis

Documentation

newtype WithConstantFields (obj :: k) (a :: Type) Source #

Add arbitrary constant fields to the encoded object and require them when decoding.

Constructors

WithConstantFields a 
Instances
Generic (WithConstantFields obj a) Source # 
Instance details

Defined in Data.Aeson.Deriving.WithConstantFields

Associated Types

type Rep (WithConstantFields obj a) :: Type -> Type #

Methods

from :: WithConstantFields obj a -> Rep (WithConstantFields obj a) x #

to :: Rep (WithConstantFields obj a) x -> WithConstantFields obj a #

(ToJSON a, LoopWarning (WithConstantFields obj) a, KnownJSONObject obj) => ToJSON (WithConstantFields obj a) Source # 
Instance details

Defined in Data.Aeson.Deriving.WithConstantFields

(FromJSON a, LoopWarning (WithConstantFields obj) a, KnownJSONObject obj) => FromJSON (WithConstantFields obj a) Source # 
Instance details

Defined in Data.Aeson.Deriving.WithConstantFields

type Rep (WithConstantFields obj a) Source # 
Instance details

Defined in Data.Aeson.Deriving.WithConstantFields

type Rep (WithConstantFields obj a) = D1 (MetaData "WithConstantFields" "Data.Aeson.Deriving.WithConstantFields" "aeson-deriving-0.1.1.1-GeP8jX6AFplFkH7ZD4KBPc" True) (C1 (MetaCons "WithConstantFields" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))

newtype WithConstantFieldsOut (obj :: k) (a :: Type) Source #

Add arbitrary constant fields to the encoded object, but do not require them when decoding.

Constructors

WithConstantFieldsOut a 
Instances
Generic (WithConstantFieldsOut obj a) Source # 
Instance details

Defined in Data.Aeson.Deriving.WithConstantFields

Associated Types

type Rep (WithConstantFieldsOut obj a) :: Type -> Type #

(LoopWarning (WithConstantFields obj) a, ToJSON a, KnownJSONObject obj) => ToJSON (WithConstantFieldsOut obj a) Source # 
Instance details

Defined in Data.Aeson.Deriving.WithConstantFields

FromJSON a => FromJSON (WithConstantFieldsOut obj a) Source # 
Instance details

Defined in Data.Aeson.Deriving.WithConstantFields

type Rep (WithConstantFieldsOut obj a) Source # 
Instance details

Defined in Data.Aeson.Deriving.WithConstantFields

type Rep (WithConstantFieldsOut obj a) = D1 (MetaData "WithConstantFieldsOut" "Data.Aeson.Deriving.WithConstantFields" "aeson-deriving-0.1.1.1-GeP8jX6AFplFkH7ZD4KBPc" True) (C1 (MetaCons "WithConstantFieldsOut" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))

newtype WithConstantFieldsIn (obj :: k) (a :: Type) Source #

Require arbitrary constant fields when decoding the object, but do not add them when encoding.

Constructors

WithConstantFieldsIn a 
Instances
Generic (WithConstantFieldsIn obj a) Source # 
Instance details

Defined in Data.Aeson.Deriving.WithConstantFields

Associated Types

type Rep (WithConstantFieldsIn obj a) :: Type -> Type #

ToJSON a => ToJSON (WithConstantFieldsIn obj a) Source # 
Instance details

Defined in Data.Aeson.Deriving.WithConstantFields

(LoopWarning (WithConstantFields obj) a, FromJSON a, KnownJSONObject obj) => FromJSON (WithConstantFieldsIn obj a) Source # 
Instance details

Defined in Data.Aeson.Deriving.WithConstantFields

type Rep (WithConstantFieldsIn obj a) Source # 
Instance details

Defined in Data.Aeson.Deriving.WithConstantFields

type Rep (WithConstantFieldsIn obj a) = D1 (MetaData "WithConstantFieldsIn" "Data.Aeson.Deriving.WithConstantFields" "aeson-deriving-0.1.1.1-GeP8jX6AFplFkH7ZD4KBPc" True) (C1 (MetaCons "WithConstantFieldsIn" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))