Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hledger.Web.Json
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
Orphan instances
FromJSON Account Source # | |
FromJSON AccountDeclarationInfo Source # | |
FromJSON Amount Source # | |
FromJSON AmountStyle Source # | |
FromJSON BalanceAssertion Source # | |
FromJSON DigitGroupStyle Source # | |
FromJSON GenericSourcePos Source # | |
FromJSON MarketPrice Source # | |
FromJSON MixedAmount Source # | |
FromJSON Posting Source # | |
FromJSON PostingType Source # | |
FromJSON Price Source # | |
FromJSON Side Source # | |
FromJSON Status Source # | |
FromJSON Transaction Source # | |
ToJSON Decimal Source # | |
Methods toEncoding :: Decimal -> Encoding # toJSONList :: [Decimal] -> Value # toEncodingList :: [Decimal] -> Encoding # | |
ToJSON Account Source # | |
Methods toEncoding :: Account -> Encoding # toJSONList :: [Account] -> Value # toEncodingList :: [Account] -> Encoding # | |
ToJSON Amount Source # | |
Methods toEncoding :: Amount -> Encoding # toJSONList :: [Amount] -> Value # toEncodingList :: [Amount] -> Encoding # | |
ToJSON AmountStyle Source # | |
Methods toJSON :: AmountStyle -> Value # toEncoding :: AmountStyle -> Encoding # toJSONList :: [AmountStyle] -> Value # toEncodingList :: [AmountStyle] -> Encoding # | |
ToJSON BalanceAssertion Source # | |
Methods toJSON :: BalanceAssertion -> Value # toEncoding :: BalanceAssertion -> Encoding # toJSONList :: [BalanceAssertion] -> Value # toEncodingList :: [BalanceAssertion] -> Encoding # | |
ToJSON DigitGroupStyle Source # | |
Methods toJSON :: DigitGroupStyle -> Value # toEncoding :: DigitGroupStyle -> Encoding # toJSONList :: [DigitGroupStyle] -> Value # toEncodingList :: [DigitGroupStyle] -> Encoding # | |
ToJSON GenericSourcePos Source # | |
Methods toJSON :: GenericSourcePos -> Value # toEncoding :: GenericSourcePos -> Encoding # toJSONList :: [GenericSourcePos] -> Value # toEncodingList :: [GenericSourcePos] -> Encoding # | |
ToJSON MarketPrice Source # | |
Methods toJSON :: MarketPrice -> Value # toEncoding :: MarketPrice -> Encoding # toJSONList :: [MarketPrice] -> Value # toEncodingList :: [MarketPrice] -> Encoding # | |
ToJSON MixedAmount Source # | |
Methods toJSON :: MixedAmount -> Value # toEncoding :: MixedAmount -> Encoding # toJSONList :: [MixedAmount] -> Value # toEncodingList :: [MixedAmount] -> Encoding # | |
ToJSON Posting Source # | |
Methods toEncoding :: Posting -> Encoding # toJSONList :: [Posting] -> Value # toEncodingList :: [Posting] -> Encoding # | |
ToJSON PostingType Source # | |
Methods toJSON :: PostingType -> Value # toEncoding :: PostingType -> Encoding # toJSONList :: [PostingType] -> Value # toEncodingList :: [PostingType] -> Encoding # | |
ToJSON Price Source # | |
Methods toEncoding :: Price -> Encoding # toJSONList :: [Price] -> Value # toEncodingList :: [Price] -> Encoding # | |
ToJSON Side Source # | |
Methods toEncoding :: Side -> Encoding # toJSONList :: [Side] -> Value # toEncodingList :: [Side] -> Encoding # | |
ToJSON Status Source # | |
Methods toEncoding :: Status -> Encoding # toJSONList :: [Status] -> Value # toEncodingList :: [Status] -> Encoding # | |
ToJSON Transaction Source # | |
Methods toJSON :: Transaction -> Value # toEncoding :: Transaction -> Encoding # toJSONList :: [Transaction] -> Value # toEncodingList :: [Transaction] -> Encoding # | |
Generic (DecimalRaw a) Source # | |
FromJSON (DecimalRaw Integer) Source # | |