Portability | unportable |
---|---|
Stability | unstable |
Maintainer | Andrea Rossato <andrea.rossato@unitn.it> |
Safe Haskell | None |
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 JSValueSource
readJsonAbbrevFile :: FilePath -> IO [Abbrev]Source
readJsonAbbrev :: JSValue -> [Abbrev]Source
readJsonCitations :: JSValue -> [Cite]Source
readJSData :: Data a => JSValue -> Result aSource
readType :: Data a => JSValue -> Result aSource
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 -> StringSource
defaultJson :: [(String, JSValue)]Source