From c5f9c0ca8872b8f2b4d23f3b53d2046e6fd53ef9 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 6 Nov 2017 00:03:08 +0100 Subject: work on making auditor reports nicer (#4962) --- src/json/json_helper.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/json') diff --git a/src/json/json_helper.c b/src/json/json_helper.c index fec637bde..4f966c66f 100644 --- a/src/json/json_helper.c +++ b/src/json/json_helper.c @@ -57,6 +57,24 @@ TALER_JSON_from_amount (const struct TALER_Amount *amount) } + +/** + * Convert a TALER amount to a JSON object. + * + * @param amount the amount + * @return a json object describing the amount + */ +json_t * +TALER_JSON_from_amount_nbo (const struct TALER_AmountNBO *amount) +{ + struct TALER_Amount a; + + TALER_amount_ntoh (&a, + amount); + return TALER_JSON_from_amount (&a); +} + + /** * Parse given JSON object to Amount * -- cgit v1.2.3