Module Json2

This module is undocumented. This is a list of its definitions.

(:::) :: JSON a => String -> a -> JSEntry

key ::: value is the JSON object entry that associates key with value.

JSEntry :: String -> (StringBuilder.T -> <Proc> StringBuilder.T) -> JSEntry
JSObject :: (StringBuilder.T -> <Proc> StringBuilder.T) -> JSObject
buildJSON :: JSON a => StringBuilder.T -> a -> <Proc> StringBuilder.T

Appends the JSON text of the given value to the given string builder and returns the builder.

buildJSONList :: JSON a => StringBuilder.T -> [a] -> <Proc> StringBuilder.T

Appends the JSON text of the given list to the given string builder and returns the builder. Instances override this to write something other than a JSON array; JSEntry writes a JSON object.

toJSON :: JSON a => a -> String

The JSON text of the given value.

toJSONList :: JSON a => [a] -> [JSObject]

Wraps every element of the given list into a JSObject, so that lists of values of different types can be written as one JSON array.