Module
Data.Argonaut.Decode.Generic
- Package
- purescript-argonaut-generic
- Repository
- purescript-contrib/purescript-argonaut-generic
#DecodeRep Source
class DecodeRep r whereMembers
decodeRepWith :: Encoding -> Json -> Either JsonDecodeError r
Instances
DecodeRep NoConstructors(DecodeRep a, DecodeRep b) => DecodeRep (Sum a b)(IsSymbol name) => DecodeRep (Constructor name NoArguments)(IsSymbol name, DecodeJson a) => DecodeRep (Constructor name (Argument a))(IsSymbol name, DecodeRepArgs a) => DecodeRep (Constructor name a)
#DecodeRepArgs Source
class DecodeRepArgs r whereMembers
decodeRepArgs :: Array Json -> Either JsonDecodeError { init :: r, rest :: Array Json }
Instances
DecodeRepArgs NoArguments(DecodeRepArgs a, DecodeRepArgs b) => DecodeRepArgs (Product a b)(DecodeJson a) => DecodeRepArgs (Argument a)
#DecodeLiteral Source
class DecodeLiteral r whereMembers
decodeLiteral :: (String -> String) -> Json -> Either JsonDecodeError r
Instances
(DecodeLiteral a, DecodeLiteral b) => DecodeLiteral (Sum a b)(IsSymbol name) => DecodeLiteral (Constructor name NoArguments)
#genericDecodeJson Source
genericDecodeJson :: forall a r. Generic a r => DecodeRep r => Json -> Either JsonDecodeError aDecode Json representation of a value which has a Generic type.
#genericDecodeJsonWith Source
genericDecodeJsonWith :: forall a r. Generic a r => DecodeRep r => Encoding -> Json -> Either JsonDecodeError aDecode Json representation of a value which has a Generic type.
Takes a record for encoding settings.
#decodeLiteralSum Source
decodeLiteralSum :: forall a r. Generic a r => DecodeLiteral r => Json -> Either JsonDecodeError aA function for decoding Generic sum types using string literal representations.
#decodeLiteralSumWithTransform Source
decodeLiteralSumWithTransform :: forall a r. Generic a r => DecodeLiteral r => (String -> String) -> Json -> Either JsonDecodeError aA function for decoding Generic sum types using string literal representations.
Takes a function for transforming the tag name in encoding.