From d126b166241e36a33884bc799190c708226ddb7e Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 29 Jan 2018 19:26:10 +0100 Subject: serialize amounts as string instead of an object --- src/json/test_json.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/json/test_json.c') diff --git a/src/json/test_json.c b/src/json/test_json.c index 3a89746bd..d5b6d13e9 100644 --- a/src/json/test_json.c +++ b/src/json/test_json.c @@ -36,14 +36,14 @@ test_amount () struct TALER_Amount a1; struct TALER_Amount a2; struct GNUNET_JSON_Specification spec[] = { - TALER_JSON_spec_amount (NULL, &a2), + TALER_JSON_spec_amount ("amount", &a2), GNUNET_JSON_spec_end() }; GNUNET_assert (GNUNET_OK == TALER_string_to_amount ("EUR:4.3", &a1)); - j = TALER_JSON_from_amount (&a1); + j = json_pack("{s:o}", "amount", TALER_JSON_from_amount (&a1)); GNUNET_assert (NULL != j); GNUNET_assert (GNUNET_OK == GNUNET_JSON_parse (j, spec, -- cgit v1.2.3