regular-web-0.1.1: Generic programming for the webSource codeContentsIndex
Generics.Regular.JSON
Portabilitynon-portable
Stabilityexperimental
Maintainerchris@eidhof.nl
Description

Generic generation of JSON values. Note that the generic functions are only defined for record datatypes that contain a single constructor.

The code that is generated by gto should be parseable by gfrom.

Synopsis
gfrom :: (Regular a, GJSON (PF a)) => JSValue -> Result a
gto :: (Regular a, GJSON (PF a)) => a -> JSValue
class GJSON f
Documentation
gfrom :: (Regular a, GJSON (PF a)) => JSValue -> Result aSource
The function gfrom tries to parse a JSValue. The Result datatype is used for error-messages if parsing fails.
gto :: (Regular a, GJSON (PF a)) => a -> JSValueSource
The function gto generates a JSValue for all types that are an instance of GJSON.
class GJSON f Source
This class is used for both generation and parsing of JSON.
show/hide Instances
GJSON U
JSON a => GJSON (K a)
(GJSON (S s f), GJSON g) => GJSON (:*: (S s f) g)
GJSON f => GJSON (C c f)
(Selector s, GJSON f) => GJSON (S s f)
Produced by Haddock version 2.7.2