composite-aeson-0.5.1.0: JSON for Vinyl/Frames records

Safe HaskellNone
LanguageHaskell2010

Composite.Aeson.CoRecord

Synopsis

Documentation

type JsonFormatField e rs = Rec (JsonFormat e) rs Source #

Type of records which contain JSON formats for each element of rs.

class DefaultJsonFormatField rs where Source #

Class which makes up a JsonFormatField for some rs where each r ~ s :-> a by using the DefaultJsonFormat instance for each a.

Minimal complete definition

defaultJsonFormatField

Methods

defaultJsonFormatField :: JsonFormatField e rs Source #

Make up a JsonFormatField for some rs where each r ~ s :-> a by using the DefaultJsonFormat instance for each a.

fieldJsonFormat :: forall rs r' rs' e. (rs ~ (r' ': rs'), RecApplicative rs, RecWithContext rs rs, ReifyNames rs) => SumStyle -> JsonFormatField e rs -> JsonFormat e (Field rs) Source #

Make a JsonFormat e (Field rs) given how to map the sum type to JSON alogn with a record with formatters for each value the field could have.