json-0.4.3: Support for serialising Haskell to and from JSONSource codeContentsIndex
Text.JSON.Generic
Portabilityportable
Stabilityprovisional
MaintainerSigbjorn Finne <sof@galois.com>
Description
JSON serializer and deserializer using Data.Generics. The functions here handle algebraic data types and primitive types. It uses the same representation as Text.JSON for Prelude types.
Synopsis
module Text.JSON
Data (gfoldl, gunfold, toConstr, dataTypeOf, dataCast1, dataCast2, gmapT, gmapQl, gmapQr, gmapQ, gmapQi, gmapM, gmapMp, gmapMo)
Typeable (typeOf)
toJSON :: Data a => a -> JSValue
fromJSON :: Data a => JSValue -> Result a
encodeJSON :: Data a => a -> String
decodeJSON :: Data a => String -> a
toJSON_generic :: Data a => a -> JSValue
fromJSON_generic :: Data a => JSValue -> Result a
Documentation
module Text.JSON
Data (gfoldl, gunfold, toConstr, dataTypeOf, dataCast1, dataCast2, gmapT, gmapQl, gmapQr, gmapQ, gmapQi, gmapM, gmapMp, gmapMo)
Typeable (typeOf)
toJSON :: Data a => a -> JSValueSource
Convert anything to a JSON value.
fromJSON :: Data a => JSValue -> Result aSource
Convert a JSON value to anything (fails if the types do not match).
encodeJSON :: Data a => a -> StringSource
Encode a value as a string.
decodeJSON :: Data a => String -> aSource
Decode a string as a value.
toJSON_generic :: Data a => a -> JSValueSource
fromJSON_generic :: Data a => JSValue -> Result aSource
Produced by Haddock version 2.4.2