Module

Data.Argonaut.Decode.Generic

Package
purescript-argonaut-generic
Repository
purescript-contrib/purescript-argonaut-generic

#DecodeLiteral Source

#decodeRep Source

#genericDecodeJson Source

genericDecodeJson :: forall a r. Generic a r => DecodeRep r => Json -> Either JsonDecodeError a

Decode 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 a

Decode 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 a

A 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 a

A function for decoding Generic sum types using string literal representations. Takes a function for transforming the tag name in encoding.