Copyright | (c) Andrea Rossato |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Andrea Rossato <andrea.rossato@unitn.it> |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell98 |
A module for reading Json CSL data.
- readJsonInput :: FilePath -> IO [Reference]
- readJsonInputString :: String -> [Reference]
- readJsonFile :: FilePath -> IO JSValue
- readJsonString :: String -> JSValue
- readJsonAbbrevFile :: FilePath -> IO [Abbrev]
- readJsonAbbrev :: JSValue -> [Abbrev]
- readJsonCitations :: JSValue -> [Cite]
- editJsonCiteItems :: (String, JSValue) -> (String, JSValue)
- editJsonInput :: (String, JSValue) -> (String, JSValue)
- toString :: JSValue -> JSValue
- toJSBool :: JSValue -> JSValue
- procJSObject :: ((String, JSValue) -> (String, JSValue)) -> JSValue -> JSValue
- mapJSArray :: (JSValue -> JSValue) -> JSValue -> JSValue
- isRefDate :: String -> Bool
- readJSData :: Data a => JSValue -> Result a
- readType :: Data a => JSValue -> Result a
- selectFields :: [(String, JSValue)] -> [String] -> Result [JSValue]
- fromObj :: JSValue -> [(String, JSValue)]
- fromJString :: JSValue -> String
- defaultJson :: [(String, JSValue)]
Documentation
readJsonInput :: FilePath -> IO [Reference] Source
readJsonInputString :: String -> [Reference] Source
readJsonFile :: FilePath -> IO JSValue Source
readJsonString :: String -> JSValue Source
readJsonAbbrevFile :: FilePath -> IO [Abbrev] Source
readJsonAbbrev :: JSValue -> [Abbrev] Source
readJsonCitations :: JSValue -> [Cite] Source
readJSData :: Data a => JSValue -> Result a Source
readType :: Data a => JSValue -> Result a Source
Build a datatype from a JSON object. Uses selectFields which allows to provied default values for fields not present in the JSON object. Useble with non algebraic datatype with record fields.
fromJString :: JSValue -> String Source
defaultJson :: [(String, JSValue)] Source