-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | JSON parsing library -- -- JSON parsing library with simple and sane API @package hjson @version 1.1 module Text.HJson data Json JString :: String -> Json JNumber :: Rational -> Json JObject :: (Map String Json) -> Json JBool :: Bool -> Json JNull :: Json JArray :: [Json] -> Json -- | Class of types that can be converted to or from JSON class Jsonable a toJson :: (Jsonable a) => a -> Json fromJson :: (Jsonable a) => Json -> Maybe a -- | Parses JSON string fromString :: String -> Either String Json -- | Renders JSON to String toString :: Json -> String -- | Escapes string for inclusion in JSON escapeJString :: String -> String instance [overlap ok] Eq Json instance [overlap ok] Show Json instance [overlap ok] (Jsonable a) => Jsonable (Map String a) instance [overlap ok] Jsonable String instance [overlap ok] Jsonable Float instance [overlap ok] Jsonable Double instance [overlap ok] Jsonable Int instance [overlap ok] Jsonable Integer instance [overlap ok] Jsonable Bool instance [overlap ok] Jsonable Json