diff options
Diffstat (limited to 'src/include/taler_json_lib.h')
-rw-r--r-- | src/include/taler_json_lib.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h index f338d44ae..ea621cea6 100644 --- a/src/include/taler_json_lib.h +++ b/src/include/taler_json_lib.h | |||
@@ -80,6 +80,16 @@ TALER_JSON_pack_time_abs_nbo (const char *name, | |||
80 | 80 | ||
81 | 81 | ||
82 | /** | 82 | /** |
83 | * Put an error code into a JSON reply, including | ||
84 | * both the numeric value and the hint. | ||
85 | * | ||
86 | * @param ec error code to encode using canonical field names | ||
87 | */ | ||
88 | #define TALER_JSON_pack_ec(ec) \ | ||
89 | GNUNET_JSON_pack_string ("hint", TALER_ErrorCode_get_hint (ec)), \ | ||
90 | GNUNET_JSON_pack_uint64 ("code", ec) | ||
91 | |||
92 | /** | ||
83 | * Generate packer instruction for a JSON field of type | 93 | * Generate packer instruction for a JSON field of type |
84 | * absolute time creating a human-readable timestamp. | 94 | * absolute time creating a human-readable timestamp. |
85 | * | 95 | * |