hledger-lib-1.21: A reusable library providing the core functionality of hledger
Safe HaskellNone
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

Generic Ledger Source # 
Instance details

Associated Types

type Rep Ledger :: Type -> Type #

Methods

from :: Ledger -> Rep Ledger x #

to :: Rep Ledger x -> Ledger #

ToJSON Decimal Source # 
Instance details

ToJSON ClockTime Source # 
Instance details

ToJSON Ledger Source # 
Instance details

ToJSON Account Source # 
Instance details

ToJSON AccountDeclarationInfo Source # 
Instance details

ToJSON PayeeDeclarationInfo Source # 
Instance details

ToJSON Journal Source # 
Instance details

ToJSON MarketPrice Source # 
Instance details

ToJSON PriceDirective Source # 
Instance details

ToJSON TimeclockEntry Source # 
Instance details

ToJSON TimeclockCode Source # 
Instance details

ToJSON PeriodicTransaction Source # 
Instance details

ToJSON TransactionModifier Source # 
Instance details

ToJSON Transaction Source # 
Instance details

ToJSON GenericSourcePos Source # 
Instance details

ToJSON Posting Source # 
Instance details

ToJSON BalanceAssertion Source # 
Instance details

ToJSON Status Source # 
Instance details

ToJSON PostingType Source # 
Instance details

ToJSON MixedAmount Source # 
Instance details

ToJSON Amount Source # 
Instance details

ToJSON Commodity Source # 
Instance details

ToJSON DigitGroupStyle Source # 
Instance details

ToJSON AmountPrecision Source # 
Instance details

ToJSON AmountStyle Source # 
Instance details

ToJSON AmountPrice Source # 
Instance details

ToJSON Side Source # 
Instance details

ToJSON AccountAlias Source # 
Instance details

ToJSON AccountType Source # 
Instance details

ToJSON Interval Source # 
Instance details

ToJSON DateSpan Source # 
Instance details

ToJSONKey AccountType Source # 
Instance details

FromJSON Account Source # 
Instance details

FromJSON AccountDeclarationInfo Source # 
Instance details

FromJSON MarketPrice Source # 
Instance details

FromJSON Transaction Source # 
Instance details

FromJSON GenericSourcePos Source # 
Instance details

FromJSON Posting Source # 
Instance details

FromJSON BalanceAssertion Source # 
Instance details

FromJSON Status Source # 
Instance details

FromJSON PostingType Source # 
Instance details

FromJSON MixedAmount Source # 
Instance details

FromJSON Amount Source # 
Instance details

FromJSON DigitGroupStyle Source # 
Instance details

FromJSON AmountPrecision Source # 
Instance details

FromJSON AmountStyle Source # 
Instance details

FromJSON AmountPrice Source # 
Instance details

FromJSON Side Source # 
Instance details

Generic (DecimalRaw a) Source # 
Instance details

Associated Types

type Rep (DecimalRaw a) :: Type -> Type #

Methods

from :: DecimalRaw a -> Rep (DecimalRaw a) x #

to :: Rep (DecimalRaw a) x -> DecimalRaw a #

FromJSON (DecimalRaw Integer) Source # 
Instance details