json-0.3.3: Support for serialising Haskell to and from JSONContentsIndex
Text.JSON.String
Portabilityportable
Stabilityprovisional
MaintainerDon Stewart <dons@galois.com>
Contents
Parsing
Reading JSON
Writing JSON
Description
Synopsis
data GetJSON a
runGetJSON :: GetJSON a -> String -> Either String a
readJSNull :: GetJSON JSValue
readJSBool :: GetJSON JSValue
readJSString :: GetJSON JSValue
readJSRational :: GetJSON Rational
readJSArray :: GetJSON JSValue
readJSObject :: GetJSON JSValue
readJSValue :: GetJSON JSValue
readJSTopType :: GetJSON JSValue
showJSNull :: ShowS
showJSBool :: Bool -> ShowS
showJSRational :: Rational -> ShowS
showJSArray :: [JSValue] -> ShowS
showJSObject :: JSObject JSValue -> ShowS
showJSValue :: JSValue -> ShowS
showJSTopType :: JSValue -> ShowS
Parsing
data GetJSON a

Parsing JSON

The type of JSON parsers for String

show/hide Instances
runGetJSON :: GetJSON a -> String -> Either String a
Run a JSON reader on an input String, returning some Haskell value. All input will be consumed.
Reading JSON
readJSNull :: GetJSON JSValue
Read the JSON null type
readJSBool :: GetJSON JSValue
Read the JSON Bool type
readJSString :: GetJSON JSValue
Read the JSON String type
readJSRational :: GetJSON Rational
Read an Integer or Double in JSON format, returning a Rational
readJSArray :: GetJSON JSValue
Read a list in JSON format
readJSObject :: GetJSON JSValue
Read an object in JSON format
readJSValue :: GetJSON JSValue
Read one of several possible JS types
readJSTopType :: GetJSON JSValue
Top level JSON can only be Arrays or Objects
Writing JSON
showJSNull :: ShowS
Write the JSON null type
showJSBool :: Bool -> ShowS
Write the JSON Bool type
showJSRational :: Rational -> ShowS
Show a Rational in JSON format
showJSArray :: [JSValue] -> ShowS
Show a list in JSON format
showJSObject :: JSObject JSValue -> ShowS
Show an association list in JSON format
showJSValue :: JSValue -> ShowS
Show JSON values
showJSTopType :: JSValue -> ShowS

Writing JSON

Show strict JSON top level types. Values not permitted at the top level are wrapped in a singleton array.

Produced by Haddock version 2.1.0