Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- readJsonFile :: FromJSON a => FilePath -> IO a
- writeJsonFile :: ToJSON a => FilePath -> a -> IO ()
Instances
Utilities
readJsonFile :: FromJSON a => FilePath -> IO a Source #
Read a json from a file and decode/parse it as the target type, if we can. Example: >>> readJsonFile "in.json" :: IO MixedAmount
writeJsonFile :: ToJSON a => FilePath -> a -> IO () Source #
Write some to-JSON-convertible haskell value to a json file, if we can. Example: >>> writeJsonFile "out.json" nullmixedamt