Module
Data.Argonaut.Aeson.Encode.Generic
- Package
- purescript-argonaut-aeson-generic
- Repository
- coot/purescript-argonaut-aeson-generic
#EncodeAeson Source
class EncodeAeson r where
Members
encodeAeson :: Options -> r -> Json
Instances
(EncodeAeson' Int) => EncodeAeson Int
(EncodeAeson' NoConstructors) => EncodeAeson NoConstructors
(EncodeRepArgs a, IsSymbol name, AreAllConstructorsNullary (Constructor name a), IsSingleConstructor (Constructor name a)) => EncodeAeson (Constructor name a)
(EncodeAeson' (Sum a b), AreAllConstructorsNullary (Sum a b), IsSingleConstructor (Sum a b)) => EncodeAeson (Sum a b)
#EncodeAeson' Source
class EncodeAeson' r where
Members
encodeAeson' :: Mode -> Options -> r -> Json
Instances
EncodeAeson' Int
EncodeAeson' NoConstructors
(EncodeAeson' a, EncodeAeson' b) => EncodeAeson' (Sum a b)
(IsSymbol name, EncodeRepArgs a) => EncodeAeson' (Constructor name a)
#EncodeRepArgs Source
class EncodeRepArgs r where
Members
encodeRepArgs :: r -> RepArgsEncoding
Instances
EncodeRepArgs NoArguments
(EncodeRepArgs a, EncodeRepArgs b) => EncodeRepArgs (Product a b)
(EncodeJson a) => EncodeRepArgs (Argument a)
#EncodeRepFields Source
class EncodeRepFields :: RowList Type -> Row Type -> Constraint
class EncodeRepFields (rs :: RowList Type) (row :: Row Type) | rs -> row where
Encode record fields
Members
encodeFields :: Proxy rs -> Record row -> (Object Json)
Instances
(IsSymbol name, EncodeJson ty, Cons name ty tailRow row, EncodeRepFields tail row) => EncodeRepFields (Cons name ty tail) row
EncodeRepFields Nil row
#genericEncodeAeson Source
genericEncodeAeson :: forall a r. Generic a r => EncodeAeson r => Options -> a -> Json
Encode any Generic
data structure into Json
using Aeson
encoding