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

Safe HaskellNone
LanguageHaskell2010

Data.Aeson.Deriving.EmptyObject

Description

Allow unit-like types to be serialized as the empty object This can be combined with WithConstantFields.

Synopsis

Documentation

newtype EmptyObject a Source #

For data types with exactly one value, this data type changes the serialization to be the empty JSON object. It can be combined with WithConstantFields.

Constructors

EmptyObject a 

class UnitLike (f :: Type -> Type) where Source #

class for data types with a single constructor

Methods

gPoint :: f a Source #

Instances
UnitLike (U1 :: Type -> Type) Source # 
Instance details

Defined in Data.Aeson.Deriving.EmptyObject

Methods

gPoint :: U1 a Source #

UnitLike a => UnitLike (M1 D meta a) Source # 
Instance details

Defined in Data.Aeson.Deriving.EmptyObject

Methods

gPoint :: M1 D meta a a0 Source #

UnitLike a => UnitLike (M1 C meta a) Source # 
Instance details

Defined in Data.Aeson.Deriving.EmptyObject

Methods

gPoint :: M1 C meta a a0 Source #