Module

Data.Argonaut.Encode.Generic

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

#EncodeRep Source

class EncodeRep r  where

Members

Instances

#EncodeLiteral Source

class EncodeLiteral r  where

Members

Instances

#encodeRep Source

encodeRep :: forall r. EncodeRep r => r -> Json

#genericEncodeJson Source

genericEncodeJson :: forall a r. Generic a r => EncodeRep r => a -> Json

Encode any Generic data structure into Json.

#genericEncodeJsonWith Source

genericEncodeJsonWith :: forall a r. Generic a r => EncodeRep r => Encoding -> a -> Json

Encode any Generic data structure into Json. Takes a record for encoding settings.

#encodeLiteralSum Source

encodeLiteralSum :: forall a r. Generic a r => EncodeLiteral r => a -> Json

A function for encoding Generic sum types using string literal representations.

#encodeLiteralSumWithTransform Source

encodeLiteralSumWithTransform :: forall a r. Generic a r => EncodeLiteral r => (String -> String) -> a -> Json

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