JSON-Combinator-0.2.8: A combinator library on top of a generalised JSON type

Text.JSON.JSONLike

Description

The generalisation of a JSON object.

Synopsis

Documentation

class JSONLike j s a o | j -> s, j -> a, j -> o whereSource

The generalisation of a JSON object.

Methods

foldJSONSource

Arguments

:: x

If a JSON null value.

-> x

If a JSON true value.

-> x

If a JSON false value.

-> (Rational -> x)

If a JSON number value.

-> (s -> x)

If a JSON string value.

-> (a j -> x)

If a JSON array value.

-> (o j -> x)

If a JSON object value.

-> j 
-> x 

Deconstructs a JSON object.

jnull :: jSource

Constructs a JSON null value.

jtrue :: jSource

Constructs a JSON true value.

jfalse :: jSource

Constructs a JSON false value.

jnumber :: Rational -> jSource

Constructs a JSON number value from the given rational.

jstring :: s -> jSource

Constructs a JSON string value from the given string.

jarray :: a j -> jSource

Constructs a JSON array value from the given array.

jobject :: o j -> jSource

Constructs a JSON object value from the given object.