| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
System.Cached.JSON
Synopsis
- getCachedJSON :: (FromJSON a, ToJSON a) => String -> FilePath -> String -> NominalDiffTime -> IO a
- getCachedJSONQuery :: (FromJSON a, ToJSON a) => String -> FilePath -> IO a -> NominalDiffTime -> IO a
- lookupKey :: FromJSON a => Text -> Object -> Maybe a
Documentation
Arguments
| :: (FromJSON a, ToJSON a) | |
| => String | program name |
| -> FilePath | filename |
| -> String | json url |
| -> NominalDiffTime | cache duration (minutes) |
| -> IO a |
If the local cached json file is new enough then use it, otherwise refresh from the remote url.