aboutsummaryrefslogtreecommitdiff
path: root/src/json/test_json.c
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-01-29 19:26:10 +0100
committerFlorian Dold <florian.dold@gmail.com>2018-01-29 19:26:10 +0100
commitd126b166241e36a33884bc799190c708226ddb7e (patch)
treef953a28008961817f19e7bd88b63aa7f755f6bfb /src/json/test_json.c
parentafe945167ad8f794a6b9b1dbb23d7a1148c1c2eb (diff)
serialize amounts as string instead of an object
Diffstat (limited to 'src/json/test_json.c')
-rw-r--r--src/json/test_json.c4
1 files changed, 2 insertions, 2 deletions
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,