diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-01-29 19:26:10 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-01-29 19:26:10 +0100 |
commit | d126b166241e36a33884bc799190c708226ddb7e (patch) | |
tree | f953a28008961817f19e7bd88b63aa7f755f6bfb /src/json/test_json.c | |
parent | afe945167ad8f794a6b9b1dbb23d7a1148c1c2eb (diff) |
serialize amounts as string instead of an object
Diffstat (limited to 'src/json/test_json.c')
-rw-r--r-- | src/json/test_json.c | 4 |
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, |