hledger-lib-1.29: A reusable library providing the core functionality of hledger
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hledger.Data.Json

Synopsis

Instances

Utilities

toJsonText :: ToJSON a => a -> Text Source #

Show a JSON-convertible haskell value as pretty-printed JSON text.

writeJsonFile :: ToJSON a => FilePath -> a -> IO () Source #

Write a JSON-convertible haskell value to a pretty-printed JSON file. Eg: writeJsonFile "a.json" nulltransaction

readJsonFile :: FromJSON a => FilePath -> IO a Source #

Read a JSON file and decode it to the target type, or raise an error if we can't. Eg: readJsonFile "a.json" :: IO Transaction

Orphan instances

FromJSON Account Source # 
Instance details

FromJSON AccountDeclarationInfo Source # 
Instance details

FromJSON Amount Source # 
Instance details

FromJSON AmountPrecision Source # 
Instance details

FromJSON AmountPrice Source # 
Instance details

FromJSON AmountStyle Source # 
Instance details

FromJSON BalanceAssertion Source # 
Instance details

FromJSON DigitGroupStyle Source # 
Instance details

FromJSON MarketPrice Source # 
Instance details

FromJSON MixedAmount Source # 
Instance details

FromJSON Posting Source # 
Instance details

FromJSON PostingType Source # 
Instance details

FromJSON Side Source # 
Instance details

FromJSON Status Source # 
Instance details

FromJSON Transaction Source # 
Instance details

FromJSON Pos Source # 
Instance details

FromJSON SourcePos Source # 
Instance details

ToJSON Account Source # 
Instance details

ToJSON AccountAlias Source # 
Instance details

ToJSON AccountDeclarationInfo Source # 
Instance details

ToJSON AccountType Source # 
Instance details

ToJSON Amount Source # 
Instance details

ToJSON AmountPrecision Source # 
Instance details

ToJSON AmountPrice Source # 
Instance details

ToJSON AmountStyle Source # 
Instance details

ToJSON BalanceAssertion Source # 
Instance details

ToJSON Commodity Source # 
Instance details

ToJSON DateSpan Source # 
Instance details

ToJSON DigitGroupStyle Source # 
Instance details

ToJSON EFDay Source # 
Instance details

ToJSON Interval Source # 
Instance details

ToJSON Journal Source # 
Instance details

ToJSON Ledger Source # 
Instance details

ToJSON MarketPrice Source # 
Instance details

ToJSON MixedAmount Source # 
Instance details

ToJSON PayeeDeclarationInfo Source # 
Instance details

ToJSON Period Source # 
Instance details

ToJSON PeriodicTransaction Source # 
Instance details

ToJSON Posting Source # 
Instance details

ToJSON PostingType Source # 
Instance details

ToJSON PriceDirective Source # 
Instance details

ToJSON Side Source # 
Instance details

ToJSON Status Source # 
Instance details

ToJSON TMPostingRule Source # 
Instance details

ToJSON TagDeclarationInfo Source # 
Instance details

ToJSON TimeclockCode Source # 
Instance details

ToJSON TimeclockEntry Source # 
Instance details

ToJSON Transaction Source # 
Instance details

ToJSON TransactionModifier Source # 
Instance details

ToJSON Pos Source # 
Instance details

ToJSON SourcePos Source # 
Instance details

ToJSONKey AccountType Source # 
Instance details

FromJSON (DecimalRaw Integer) Source # 
Instance details

(Integral a, ToJSON a) => ToJSON (DecimalRaw a) Source # 
Instance details