CodecJson
Functions
fnaccount_from_valueaccount_from_value(j : Json.JsonValue) : Result(LedgerAccount.Account, CodecError.Error)#
fnaccount_valueaccount_value(a : LedgerAccount.Account) : Json.JsonValue#
fndecode_accountdecode_account(s : String) : Result(LedgerAccount.Account, CodecError.Error)#
fndecode_draftdecode_draft(s : String) : Result(LedgerEntry.Draft, CodecError.Error)#
fndecode_journaldecode_journal(s : String) : Result(LedgerJournal.Ledger, CodecError.Error)#
fndecode_quantitydecode_quantity(s : String) : Result(FinanceAmount.Quantity, CodecError.Error)#
fndirection_textdirection_text(d : LedgerEntry.Direction) : String#
fndraft_from_valuedraft_from_value(j : Json.JsonValue) : Result(LedgerEntry.Draft, CodecError.Error)#
fndraft_valuedraft_value(d : LedgerEntry.Draft) : Json.JsonValue#
fnencode_accountencode_account(a : LedgerAccount.Account) : String do Json.to_string(account_value(a)) end#
fnencode_draftencode_draft(d : LedgerEntry.Draft) : String do Json.to_string(draft_value(d)) end#
fnencode_journalencode_journal(l : LedgerJournal.Ledger) : String#
fnencode_quantityencode_quantity(q : FinanceAmount.Quantity) : String do FinanceCodec.encode(q) end#
fnkind_textkind_text(k : LedgerAccount.Kind) : String#
fnparse_directionparse_direction(s : String) : Result(LedgerEntry.Direction, CodecError.Error)#
fnparse_kindparse_kind(s : String) : Result(LedgerAccount.Kind, CodecError.Error)#
fnposting_from_valueposting_from_value(j : Json.JsonValue) : Result(LedgerEntry.Posting, CodecError.Error)#
fnposting_valueposting_value(p : LedgerEntry.Posting) : Json.JsonValue#
fnquantity_from_valuequantity_from_value(j : Json.JsonValue) : Result(FinanceAmount.Quantity, CodecError.Error) do decode_quantity(Json.to_string(j)) end#
fnquantity_valuequantity_value(q : FinanceAmount.Quantity) : Json.JsonValue#