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

Safe HaskellNone
LanguageHaskell2010

Data.Aeson.Deriving.SingleFieldObject

Synopsis

Documentation

newtype SingleFieldObject (fieldName :: Symbol) a Source #

Puts the entire output of encoding the inner type within a single field

Constructors

SingleFieldObject a 
Instances
Generic (SingleFieldObject fieldName a) Source # 
Instance details

Defined in Data.Aeson.Deriving.SingleFieldObject

Associated Types

type Rep (SingleFieldObject fieldName a) :: Type -> Type #

Methods

from :: SingleFieldObject fieldName a -> Rep (SingleFieldObject fieldName a) x #

to :: Rep (SingleFieldObject fieldName a) x -> SingleFieldObject fieldName a #

(ToJSON a, LoopWarning (SingleFieldObject fieldName) a, KnownSymbol fieldName) => ToJSON (SingleFieldObject fieldName a) Source # 
Instance details

Defined in Data.Aeson.Deriving.SingleFieldObject

Methods

toJSON :: SingleFieldObject fieldName a -> Value #

toEncoding :: SingleFieldObject fieldName a -> Encoding #

toJSONList :: [SingleFieldObject fieldName a] -> Value #

toEncodingList :: [SingleFieldObject fieldName a] -> Encoding #

(FromJSON a, LoopWarning (SingleFieldObject fieldName) a, KnownSymbol fieldName) => FromJSON (SingleFieldObject fieldName a) Source # 
Instance details

Defined in Data.Aeson.Deriving.SingleFieldObject

Methods

parseJSON :: Value -> Parser (SingleFieldObject fieldName a) #

parseJSONList :: Value -> Parser [SingleFieldObject fieldName a] #

type Rep (SingleFieldObject fieldName a) Source # 
Instance details

Defined in Data.Aeson.Deriving.SingleFieldObject

type Rep (SingleFieldObject fieldName a) = D1 (MetaData "SingleFieldObject" "Data.Aeson.Deriving.SingleFieldObject" "aeson-deriving-0.1.1-JCO4qxNT92UAjceLt3E32w" True) (C1 (MetaCons "SingleFieldObject" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))