-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Support for serialising Haskell to and from JSON
--   
--   JSON (JavaScript Object Notation) is a lightweight data-interchange
--   format. It is easy for humans to read and write. It is easy for
--   machines to parse and generate. It is based on a subset of the
--   JavaScript Programming Language, Standard ECMA-262 3rd Edition -
--   December 1999.
--   
--   This library provides a parser and pretty printer for converting
--   between Haskell values and JSON.
@package json
@version 0.11


-- | Basic support for working with JSON values.
module Text.JSON.Types

-- | JSON values
--   
--   The type to which we encode Haskell values. There's a set of
--   primitives, and a couple of heterogenous collection types.
--   
--   Objects:
--   
--   An object structure is represented as a pair of curly brackets
--   surrounding zero or more name/value pairs (or members). A name is a
--   string. A single colon comes after each name, separating the name from
--   the value. A single comma separates a value from a following name.
--   
--   Arrays:
--   
--   An array structure is represented as square brackets surrounding zero
--   or more values (or elements). Elements are separated by commas.
--   
--   Only valid JSON can be constructed this way
data JSValue
JSNull :: JSValue
JSBool :: !Bool -> JSValue
JSRational :: Bool -> !Rational -> JSValue
JSString :: JSString -> JSValue
JSArray :: [JSValue] -> JSValue
JSObject :: JSObject JSValue -> JSValue

-- | Strings can be represented a little more efficiently in JSON
newtype JSString
JSONString :: String -> JSString
[fromJSString] :: JSString -> String

-- | Turn a Haskell string into a JSON string.
toJSString :: String -> JSString

-- | As can association lists
newtype JSObject e
JSONObject :: [(String, e)] -> JSObject e
[fromJSObject] :: JSObject e -> [(String, e)]

-- | Make JSON object out of an association list.
toJSObject :: [(String, a)] -> JSObject a

-- | Get the value of a field, if it exist.
get_field :: JSObject a -> String -> Maybe a

-- | Set the value of a field. Previous values are overwritten.
set_field :: JSObject a -> String -> a -> JSObject a
instance GHC.Classes.Eq e => GHC.Classes.Eq (Text.JSON.Types.JSObject e)
instance GHC.Classes.Eq Text.JSON.Types.JSString
instance GHC.Classes.Eq Text.JSON.Types.JSValue
instance GHC.Internal.Data.String.IsString Text.JSON.Types.JSString
instance GHC.Internal.Data.String.IsString Text.JSON.Types.JSValue
instance GHC.Classes.Ord e => GHC.Classes.Ord (Text.JSON.Types.JSObject e)
instance GHC.Classes.Ord Text.JSON.Types.JSString
instance GHC.Classes.Ord Text.JSON.Types.JSValue
instance GHC.Internal.Read.Read e => GHC.Internal.Read.Read (Text.JSON.Types.JSObject e)
instance GHC.Internal.Read.Read Text.JSON.Types.JSString
instance GHC.Internal.Read.Read Text.JSON.Types.JSValue
instance GHC.Internal.Show.Show e => GHC.Internal.Show.Show (Text.JSON.Types.JSObject e)
instance GHC.Internal.Show.Show Text.JSON.Types.JSString
instance GHC.Internal.Show.Show Text.JSON.Types.JSValue


-- | Basic support for working with JSON values.
module Text.JSON.String

-- | Parsing JSON
--   
--   The type of JSON parsers for String
data GetJSON a

-- | Run a JSON reader on an input String, returning some Haskell value.
--   All input will be consumed.
runGetJSON :: GetJSON a -> String -> Either String a

-- | Read the JSON null type
readJSNull :: GetJSON JSValue

-- | Read the JSON Bool type
readJSBool :: GetJSON JSValue

-- | Read the JSON String type
readJSString :: GetJSON JSValue

-- | Read an Integer or Double in JSON format, returning a Rational
readJSRational :: GetJSON Rational

-- | Read a list in JSON format
readJSArray :: GetJSON JSValue

-- | Read an object in JSON format
readJSObject :: GetJSON JSValue

-- | Read one of several possible JS types
readJSValue :: GetJSON JSValue

-- | Top level JSON can only be Arrays or Objects
readJSTopType :: GetJSON JSValue

-- | Write the JSON null type
showJSNull :: ShowS

-- | Write the JSON Bool type
showJSBool :: Bool -> ShowS

-- | Show a list in JSON format
showJSArray :: [JSValue] -> ShowS

-- | Show an association list in JSON format
showJSObject :: JSObject JSValue -> ShowS

-- | Show a Rational in JSON format
showJSRational :: Rational -> ShowS
showJSRational' :: Bool -> Rational -> ShowS

-- | Show JSON values
showJSValue :: JSValue -> ShowS

-- | Writing JSON
--   
--   Show strict JSON top level types. Values not permitted at the top
--   level are wrapped in a singleton array.
showJSTopType :: JSValue -> ShowS
instance GHC.Internal.Base.Applicative Text.JSON.String.GetJSON
instance GHC.Internal.Base.Functor Text.JSON.String.GetJSON
instance GHC.Internal.Control.Monad.Fail.MonadFail Text.JSON.String.GetJSON
instance GHC.Internal.Base.Monad Text.JSON.String.GetJSON


-- | Parse JSON values using the ReadP combinators.
module Text.JSON.ReadP
p_value :: ReadP JSValue
p_null :: ReadP ()
p_boolean :: ReadP Bool
p_array :: ReadP [JSValue]
p_string :: ReadP String
p_object :: ReadP [(String, JSValue)]
p_number :: ReadP Rational
p_js_string :: ReadP JSString
p_js_object :: ReadP (JSObject JSValue)
data ReadP a
type ReadS a = String -> [(a, String)]
many :: ReadP a -> ReadP [a]
gather :: ReadP a -> ReadP (String, a)
munch1 :: (Char -> Bool) -> ReadP String
readP_to_S :: ReadP a -> ReadS a
(+++) :: ReadP a -> ReadP a -> ReadP a
get :: ReadP Char
look :: ReadP String
pfail :: ReadP a
optional :: ReadP a -> ReadP ()
(<++) :: ReadP a -> ReadP a -> ReadP a
readS_to_P :: ReadS a -> ReadP a
choice :: [ReadP a] -> ReadP a
char :: Char -> ReadP Char
munch :: (Char -> Bool) -> ReadP String
satisfy :: (Char -> Bool) -> ReadP Char
skipSpaces :: ReadP ()
string :: String -> ReadP String
between :: ReadP open -> ReadP close -> ReadP a -> ReadP a
chainl :: ReadP a -> ReadP (a -> a -> a) -> a -> ReadP a
chainl1 :: ReadP a -> ReadP (a -> a -> a) -> ReadP a
chainr :: ReadP a -> ReadP (a -> a -> a) -> a -> ReadP a
chainr1 :: ReadP a -> ReadP (a -> a -> a) -> ReadP a
count :: Int -> ReadP a -> ReadP [a]
endBy :: ReadP a -> ReadP sep -> ReadP [a]
endBy1 :: ReadP a -> ReadP sep -> ReadP [a]
eof :: ReadP ()
many1 :: ReadP a -> ReadP [a]
manyTill :: ReadP a -> ReadP end -> ReadP [a]
option :: a -> ReadP a -> ReadP a
sepBy :: ReadP a -> ReadP sep -> ReadP [a]
sepBy1 :: ReadP a -> ReadP sep -> ReadP [a]
skipMany :: ReadP a -> ReadP ()
skipMany1 :: ReadP a -> ReadP ()


-- | Display JSON values using pretty printing combinators.
module Text.JSON.Pretty
pp_value :: JSValue -> Doc
pp_null :: Doc
pp_boolean :: Bool -> Doc
pp_number :: Bool -> Rational -> Doc
pp_js_string :: JSString -> Doc
pp_array :: [JSValue] -> Doc
pp_js_object :: JSObject JSValue -> Doc
pp_string :: String -> Doc
pp_object :: [(String, JSValue)] -> Doc
text :: String -> Doc
($$) :: Doc -> Doc -> Doc
(<>) :: Doc -> Doc -> Doc
empty :: Doc
parens :: Doc -> Doc
char :: Char -> Doc
sep :: [Doc] -> Doc
(<+>) :: Doc -> Doc -> Doc
first :: Doc -> Doc -> Doc
data Doc
integer :: Integer -> Doc
float :: Float -> Doc
double :: Double -> Doc
brackets :: Doc -> Doc
fsep :: [Doc] -> Doc
punctuate :: Doc -> [Doc] -> [Doc]
comma :: Doc
doubleQuotes :: Doc -> Doc
hcat :: [Doc] -> Doc
braces :: Doc -> Doc
colon :: Doc
($+$) :: Doc -> Doc -> Doc
data TextDetails
Chr :: {-# UNPACK #-} !Char -> TextDetails
Str :: String -> TextDetails
PStr :: String -> TextDetails
data Mode
PageMode :: Mode
ZigZagMode :: Mode
LeftMode :: Mode
OneLineMode :: Mode
data Style
Style :: Mode -> Int -> Float -> Style
[mode] :: Style -> Mode
[lineLength] :: Style -> Int
[ribbonsPerLine] :: Style -> Float
cat :: [Doc] -> Doc
fcat :: [Doc] -> Doc
fullRender :: Mode -> Int -> Float -> (TextDetails -> a -> a) -> a -> Doc -> a
hang :: Doc -> Int -> Doc -> Doc
hsep :: [Doc] -> Doc
isEmpty :: Doc -> Bool
nest :: Int -> Doc -> Doc
ptext :: String -> Doc
reduceDoc :: Doc -> RDoc
sizedText :: Int -> String -> Doc
style :: Style
vcat :: [Doc] -> Doc
equals :: Doc
int :: Int -> Doc
lbrace :: Doc
lbrack :: Doc
lparen :: Doc
maybeBraces :: Bool -> Doc -> Doc
maybeBrackets :: Bool -> Doc -> Doc
maybeDoubleQuotes :: Bool -> Doc -> Doc
maybeParens :: Bool -> Doc -> Doc
maybeQuotes :: Bool -> Doc -> Doc
quotes :: Doc -> Doc
rational :: Rational -> Doc
rbrace :: Doc
rbrack :: Doc
render :: Doc -> String
renderStyle :: Style -> Doc -> String
rparen :: Doc
semi :: Doc
space :: Doc
zeroWidthText :: String -> Doc


-- | Parse JSON values using the Parsec combinators.
module Text.JSON.Parsec
p_value :: CharParser () JSValue
p_null :: CharParser () ()
p_boolean :: CharParser () Bool
p_array :: CharParser () [JSValue]
p_string :: CharParser () String
p_object :: CharParser () [(String, JSValue)]
p_number :: CharParser () Rational
p_js_string :: CharParser () JSString
p_js_object :: CharParser () (JSObject JSValue)
p_jvalue :: CharParser () JSValue
label :: forall s u (m :: Type -> Type) a. ParsecT s u m a -> String -> ParsecT s u m a
token :: Stream s Identity t => (t -> String) -> (t -> SourcePos) -> (t -> Maybe a) -> Parsec s u a
data State s u
State :: s -> !SourcePos -> !u -> State s u
[stateInput] :: State s u -> s
[statePos] :: State s u -> !SourcePos
[stateUser] :: State s u -> !u
(<|>) :: forall s u (m :: Type -> Type) a. ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
many :: forall s u (m :: Type -> Type) a. ParsecT s u m a -> ParsecT s u m [a]
optional :: forall s (m :: Type -> Type) t u a. Stream s m t => ParsecT s u m a -> ParsecT s u m ()
choice :: forall s (m :: Type -> Type) t u a. Stream s m t => [ParsecT s u m a] -> ParsecT s u m a
char :: forall s (m :: Type -> Type) u. Stream s m Char => Char -> ParsecT s u m Char
satisfy :: forall s (m :: Type -> Type) u. Stream s m Char => (Char -> Bool) -> ParsecT s u m Char
string :: forall s (m :: Type -> Type) u. Stream s m Char => String -> ParsecT s u m String
between :: forall s (m :: Type -> Type) t u open close a. Stream s m t => ParsecT s u m open -> ParsecT s u m close -> ParsecT s u m a -> ParsecT s u m a
chainl :: forall s (m :: Type -> Type) t u a. Stream s m t => ParsecT s u m a -> ParsecT s u m (a -> a -> a) -> a -> ParsecT s u m a
chainl1 :: forall s (m :: Type -> Type) t u a. Stream s m t => ParsecT s u m a -> ParsecT s u m (a -> a -> a) -> ParsecT s u m a
chainr :: forall s (m :: Type -> Type) t u a. Stream s m t => ParsecT s u m a -> ParsecT s u m (a -> a -> a) -> a -> ParsecT s u m a
chainr1 :: forall s (m :: Type -> Type) t u a. Stream s m t => ParsecT s u m a -> ParsecT s u m (a -> a -> a) -> ParsecT s u m a
count :: forall s (m :: Type -> Type) t u a. Stream s m t => Int -> ParsecT s u m a -> ParsecT s u m [a]
endBy :: forall s (m :: Type -> Type) t u a sep. Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]
endBy1 :: forall s (m :: Type -> Type) t u a sep. Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]
eof :: forall s (m :: Type -> Type) t u. (Stream s m t, Show t) => ParsecT s u m ()
many1 :: forall s u (m :: Type -> Type) a. ParsecT s u m a -> ParsecT s u m [a]
manyTill :: forall s (m :: Type -> Type) t u a end. Stream s m t => ParsecT s u m a -> ParsecT s u m end -> ParsecT s u m [a]
option :: forall s (m :: Type -> Type) t a u. Stream s m t => a -> ParsecT s u m a -> ParsecT s u m a
sepBy :: forall s (m :: Type -> Type) t u a sep. Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]
sepBy1 :: forall s (m :: Type -> Type) t u a sep. Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]
skipMany :: forall s u (m :: Type -> Type) a. ParsecT s u m a -> ParsecT s u m ()
skipMany1 :: forall s (m :: Type -> Type) t u a. Stream s m t => ParsecT s u m a -> ParsecT s u m ()
getInput :: forall (m :: Type -> Type) s u. Monad m => ParsecT s u m s
setInput :: forall (m :: Type -> Type) s u. Monad m => s -> ParsecT s u m ()
parse :: Stream s Identity t => Parsec s () a -> SourceName -> s -> Either ParseError a
space :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
type CharParser st = GenParser Char st
spaces :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m ()
(<?>) :: forall s u (m :: Type -> Type) a. ParsecT s u m a -> String -> ParsecT s u m a
alphaNum :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
anyChar :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
digit :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
hexDigit :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
letter :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
lower :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
newline :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
noneOf :: forall s (m :: Type -> Type) u. Stream s m Char => [Char] -> ParsecT s u m Char
octDigit :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
oneOf :: forall s (m :: Type -> Type) u. Stream s m Char => [Char] -> ParsecT s u m Char
tab :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
upper :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
anyToken :: forall s (m :: Type -> Type) t u. (Stream s m t, Show t) => ParsecT s u m t
notFollowedBy :: forall s (m :: Type -> Type) t a u. (Stream s m t, Show a) => ParsecT s u m a -> ParsecT s u m ()
optionMaybe :: forall s (m :: Type -> Type) t u a. Stream s m t => ParsecT s u m a -> ParsecT s u m (Maybe a)
sepEndBy :: forall s (m :: Type -> Type) t u a sep. Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]
sepEndBy1 :: forall s (m :: Type -> Type) t u a sep. Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]
data ParseError
errorPos :: ParseError -> SourcePos
type Column = Int
type Line = Int
type SourceName = String
data SourcePos
incSourceColumn :: SourcePos -> Column -> SourcePos
incSourceLine :: SourcePos -> Line -> SourcePos
setSourceColumn :: SourcePos -> Column -> SourcePos
setSourceLine :: SourcePos -> Line -> SourcePos
setSourceName :: SourcePos -> SourceName -> SourcePos
sourceColumn :: SourcePos -> Column
sourceLine :: SourcePos -> Line
sourceName :: SourcePos -> SourceName
getParserState :: forall (m :: Type -> Type) s u. Monad m => ParsecT s u m (State s u)
getPosition :: forall (m :: Type -> Type) s u. Monad m => ParsecT s u m SourcePos
getState :: forall (m :: Type -> Type) s u. Monad m => ParsecT s u m u
labels :: forall s u (m :: Type -> Type) a. ParsecT s u m a -> [String] -> ParsecT s u m a
lookAhead :: forall s (m :: Type -> Type) t u a. Stream s m t => ParsecT s u m a -> ParsecT s u m a
parseTest :: (Stream s Identity t, Show a) => Parsec s () a -> s -> IO ()
setParserState :: forall (m :: Type -> Type) s u. Monad m => State s u -> ParsecT s u m (State s u)
setPosition :: forall (m :: Type -> Type) s u. Monad m => SourcePos -> ParsecT s u m ()
setState :: forall (m :: Type -> Type) u s. Monad m => u -> ParsecT s u m ()
tokenPrim :: forall s (m :: Type -> Type) t a u. Stream s m t => (t -> String) -> (SourcePos -> t -> s -> SourcePos) -> (t -> Maybe a) -> ParsecT s u m a
tokenPrimEx :: forall s (m :: Type -> Type) t u a. Stream s m t => (t -> String) -> (SourcePos -> t -> s -> SourcePos) -> Maybe (SourcePos -> t -> s -> u -> u) -> (t -> Maybe a) -> ParsecT s u m a
tokens :: forall s (m :: Type -> Type) t u. (Stream s m t, Eq t) => ([t] -> String) -> (SourcePos -> [t] -> SourcePos) -> [t] -> ParsecT s u m [t]
unexpected :: forall s (m :: Type -> Type) t u a. Stream s m t => String -> ParsecT s u m a
updateState :: forall (m :: Type -> Type) u s. Monad m => (u -> u) -> ParsecT s u m ()
type GenParser tok st = Parsec [tok] st
type Parser = Parsec String ()
parseFromFile :: Parser a -> FilePath -> IO (Either ParseError a)
pzero :: GenParser tok st a
runParser :: GenParser tok st a -> st -> SourceName -> [tok] -> Either ParseError a
try :: GenParser tok st a -> GenParser tok st a


-- | Serialising Haskell values to and from JSON values.
module Text.JSON

-- | JSON values
--   
--   The type to which we encode Haskell values. There's a set of
--   primitives, and a couple of heterogenous collection types.
--   
--   Objects:
--   
--   An object structure is represented as a pair of curly brackets
--   surrounding zero or more name/value pairs (or members). A name is a
--   string. A single colon comes after each name, separating the name from
--   the value. A single comma separates a value from a following name.
--   
--   Arrays:
--   
--   An array structure is represented as square brackets surrounding zero
--   or more values (or elements). Elements are separated by commas.
--   
--   Only valid JSON can be constructed this way
data JSValue
JSNull :: JSValue
JSBool :: !Bool -> JSValue
JSRational :: Bool -> !Rational -> JSValue
JSString :: JSString -> JSValue
JSArray :: [JSValue] -> JSValue
JSObject :: JSObject JSValue -> JSValue

-- | The class of types serialisable to and from JSON
class JSON a
readJSON :: JSON a => JSValue -> Result a
showJSON :: JSON a => a -> JSValue
readJSONs :: JSON a => JSValue -> Result [a]
showJSONs :: JSON a => [a] -> JSValue

-- | A type for parser results
data Result a
Ok :: a -> Result a
Error :: String -> Result a

-- | Encode a Haskell value into a string, in JSON format.
--   
--   This is a superset of JSON, as types other than Array and Object are
--   allowed at the top level.
encode :: JSON a => a -> String

-- | Decode a String representing a JSON value (either an object, array,
--   bool, number, null)
--   
--   This is a superset of JSON, as types other than Array and Object are
--   allowed at the top level.
decode :: JSON a => String -> Result a

-- | Encode a value as a String in strict JSON format. This follows the
--   spec, and requires all values at the top level to be wrapped in either
--   an Array or Object. JSON types to be an Array or Object.
encodeStrict :: JSON a => a -> String

-- | Decode a String representing a strict JSON value. This follows the
--   spec, and requires top level JSON types to be an Array or Object.
decodeStrict :: JSON a => String -> Result a

-- | Strings can be represented a little more efficiently in JSON
data JSString

-- | Turn a Haskell string into a JSON string.
toJSString :: String -> JSString
fromJSString :: JSString -> String

-- | As can association lists
data JSObject e

-- | Make JSON object out of an association list.
toJSObject :: [(String, a)] -> JSObject a
fromJSObject :: JSObject e -> [(String, e)]

-- | Map Results to Eithers
resultToEither :: Result a -> Either String a

-- | Read the JSON null type
readJSNull :: GetJSON JSValue

-- | Read the JSON Bool type
readJSBool :: GetJSON JSValue

-- | Read the JSON String type
readJSString :: GetJSON JSValue

-- | Read an Integer or Double in JSON format, returning a Rational
readJSRational :: GetJSON Rational

-- | Read a list in JSON format
readJSArray :: GetJSON JSValue

-- | Read an object in JSON format
readJSObject :: GetJSON JSValue

-- | Read one of several possible JS types
readJSValue :: GetJSON JSValue

-- | Write the JSON null type
showJSNull :: ShowS

-- | Write the JSON Bool type
showJSBool :: Bool -> ShowS

-- | Show a list in JSON format
showJSArray :: [JSValue] -> ShowS

-- | Show a Rational in JSON format
showJSRational :: Rational -> ShowS
showJSRational' :: Bool -> Rational -> ShowS

-- | Show an association list in JSON format
showJSObject :: JSObject JSValue -> ShowS

-- | Show JSON values
showJSValue :: JSValue -> ShowS
makeObj :: [(String, JSValue)] -> JSValue

-- | Pull a value out of a JSON object.
valFromObj :: JSON a => String -> JSObject JSValue -> Result a

-- | Haskell types that can be used as keys in JSON objects.
class JSKey a
toJSKey :: JSKey a => a -> String
fromJSKey :: JSKey a => String -> Maybe a

-- | Encode an association list as <a>JSObject</a> value.
encJSDict :: (JSKey a, JSON b) => [(a, b)] -> JSValue

-- | Decode a <a>JSObject</a> value into an association list.
decJSDict :: (JSKey a, JSON b) => String -> JSValue -> Result [(a, b)]
instance GHC.Internal.Base.Alternative Text.JSON.Result
instance GHC.Internal.Base.Applicative Text.JSON.Result
instance GHC.Classes.Eq a => GHC.Classes.Eq (Text.JSON.Result a)
instance GHC.Internal.Base.Functor Text.JSON.Result
instance Text.JSON.JSKey GHC.Types.Int
instance Text.JSON.JSKey Text.JSON.Types.JSString
instance Text.JSON.JSKey GHC.Internal.Base.String
instance (GHC.Internal.Ix.Ix i, Text.JSON.JSON i, Text.JSON.JSON e) => Text.JSON.JSON (GHC.Internal.Arr.Array i e)
instance Text.JSON.JSON GHC.Types.Bool
instance Text.JSON.JSON Data.ByteString.Lazy.Internal.ByteString
instance Text.JSON.JSON Data.ByteString.Internal.Type.ByteString
instance Text.JSON.JSON GHC.Types.Char
instance Text.JSON.JSON GHC.Types.Double
instance (Text.JSON.JSON a, Text.JSON.JSON b) => Text.JSON.JSON (GHC.Internal.Data.Either.Either a b)
instance Text.JSON.JSON GHC.Types.Float
instance Text.JSON.JSON GHC.Types.Int
instance Text.JSON.JSON GHC.Internal.Int.Int16
instance Text.JSON.JSON GHC.Internal.Int.Int32
instance Text.JSON.JSON GHC.Internal.Int.Int64
instance Text.JSON.JSON GHC.Internal.Int.Int8
instance Text.JSON.JSON a => Text.JSON.JSON (Data.IntMap.Internal.IntMap a)
instance Text.JSON.JSON Data.IntSet.Internal.IntSet
instance Text.JSON.JSON GHC.Num.Integer.Integer
instance Text.JSON.JSON a => Text.JSON.JSON (Text.JSON.Types.JSObject a)
instance Text.JSON.JSON Text.JSON.Types.JSString
instance Text.JSON.JSON Text.JSON.Types.JSValue
instance Text.JSON.JSON a => Text.JSON.JSON [a]
instance (GHC.Classes.Ord a, Text.JSON.JSON a, Text.JSON.JSON b) => Text.JSON.JSON (Data.Map.Internal.Map a b)
instance Text.JSON.JSON a => Text.JSON.JSON (GHC.Internal.Maybe.Maybe a)
instance Text.JSON.JSON GHC.Types.Ordering
instance (GHC.Classes.Ord a, Text.JSON.JSON a) => Text.JSON.JSON (Data.Set.Internal.Set a)
instance Text.JSON.JSON Data.Text.Internal.Text
instance (Text.JSON.JSON a, Text.JSON.JSON b) => Text.JSON.JSON (a, b)
instance (Text.JSON.JSON a, Text.JSON.JSON b, Text.JSON.JSON c) => Text.JSON.JSON (a, b, c)
instance (Text.JSON.JSON a, Text.JSON.JSON b, Text.JSON.JSON c, Text.JSON.JSON d) => Text.JSON.JSON (a, b, c, d)
instance Text.JSON.JSON ()
instance Text.JSON.JSON GHC.Types.Word
instance Text.JSON.JSON GHC.Internal.Word.Word16
instance Text.JSON.JSON GHC.Internal.Word.Word32
instance Text.JSON.JSON GHC.Internal.Word.Word64
instance Text.JSON.JSON GHC.Internal.Word.Word8
instance GHC.Internal.Control.Monad.Fail.MonadFail Text.JSON.Result
instance GHC.Internal.Base.MonadPlus Text.JSON.Result
instance GHC.Internal.Base.Monad Text.JSON.Result
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Text.JSON.Result a)


-- | JSON serializer and deserializer using Data.Generics. The functions
--   here handle algebraic data types and primitive types. It uses the same
--   representation as <a>Text.JSON</a> for <a>Prelude</a> types.
module Text.JSON.Generic
class Typeable a => Data a
class Typeable (a :: k)

-- | Convert anything to a JSON value.
toJSON :: Data a => a -> JSValue

-- | Convert a JSON value to anything (fails if the types do not match).
fromJSON :: Data a => JSValue -> Result a

-- | Encode a value as a string.
encodeJSON :: Data a => a -> String

-- | Decode a string as a value.
decodeJSON :: Data a => String -> a
toJSON_generic :: Data a => a -> JSValue
fromJSON_generic :: Data a => JSValue -> Result a
