Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
newtype NamedJsonFields a Source #
Instances
(GNamedFromJSON (Rep a), Generic a) => FromJSON (NamedJsonFields a) Source # | |
Defined in DomainDriven.Internal.NamedJsonFields parseJSON :: Value -> Parser (NamedJsonFields a) # parseJSONList :: Value -> Parser [NamedJsonFields a] # | |
(GNamedToJSON (Rep a), Generic a) => ToJSON (NamedJsonFields a) Source # | |
Defined in DomainDriven.Internal.NamedJsonFields toJSON :: NamedJsonFields a -> Value # toEncoding :: NamedJsonFields a -> Encoding # toJSONList :: [NamedJsonFields a] -> Value # toEncodingList :: [NamedJsonFields a] -> Encoding # | |
(Typeable a, GNamedToSchema (Rep a)) => ToSchema (NamedJsonFields a) Source # | |
Defined in DomainDriven.Internal.NamedJsonFields declareNamedSchema :: Proxy (NamedJsonFields a) -> Declare (Definitions Schema) NamedSchema # |
gNamedToJson :: (GNamedToJSON (Rep a), Generic a) => NamedJsonOptions -> a -> Value Source #
gNamedParseJson :: (GNamedFromJSON (Rep a), Generic a) => NamedJsonOptions -> Value -> Parser a Source #
gNamedDeclareNamedSchema :: forall a. GNamedToSchema (Rep a) => NamedJsonOptions -> Proxy a -> Declare (Definitions Schema) NamedSchema Source #
data NamedJsonOptions Source #
NamedJsonOptions | |
|
Instances
Generic NamedJsonOptions Source # | |
Defined in DomainDriven.Internal.NamedJsonFields type Rep NamedJsonOptions :: Type -> Type # from :: NamedJsonOptions -> Rep NamedJsonOptions x # to :: Rep NamedJsonOptions x -> NamedJsonOptions # | |
type Rep NamedJsonOptions Source # | |
Defined in DomainDriven.Internal.NamedJsonFields type Rep NamedJsonOptions = D1 ('MetaData "NamedJsonOptions" "DomainDriven.Internal.NamedJsonFields" "domaindriven-0.5.0-DXvek89qD5M1xwQ4V40Syp" 'False) (C1 ('MetaCons "NamedJsonOptions" 'PrefixI 'True) ((S1 ('MetaSel ('Just "constructorTagModifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (String -> String)) :*: S1 ('MetaSel ('Just "tagFieldName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :*: (S1 ('MetaSel ('Just "skipTagField") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "datatypeNameModifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (String -> String))))) |
class GNamedToSchema (f :: Type -> Type) where Source #
gDeclareNamedSchema :: NamedJsonOptions -> Proxy f -> StateT [UsedName] (Declare (Definitions Schema)) NamedSchema Source #
Instances
class GNamedToJSON a where Source #
gToTupleList :: NamedJsonOptions -> a x -> State [UsedName] [(Key, Value)] Source #
Instances
class GNamedFromJSON a where Source #
gNamedFromJSON :: NamedJsonOptions -> Value -> StateT [UsedName] Parser (a x) Source #