diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-11-25 01:42:55 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-11-25 01:42:55 +0100 |
commit | 70a210ac4db07a28867e23db13c68aecc117810a (patch) | |
tree | 0b93d0f5188fc5b4ff0d9f3e559516912861b42b /src/include | |
parent | b7a5af7fd4ea302df013ad492d8a420efca5864c (diff) |
add another helper
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_json_lib.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h index 382bb19ee..6adb76b24 100644 --- a/src/include/taler_json_lib.h +++ b/src/include/taler_json_lib.h @@ -126,6 +126,19 @@ enum TALER_ErrorCode TALER_JSON_get_error_code (const json_t *json); +/** + * Extract the Taler error code from the given @a data object, which is expected to be in JSON. + * Note that #TALER_EC_INVALID is returned if no "code" is present or if @a data is not in JSON. + * + * @param data response to extract the error code from + * @param data_size number of bytes in @a data + * @return the "code" value from @a json + */ +enum TALER_ErrorCode +TALER_JSON_get_error_code2 (const void *data, + size_t data_size); + + /* **************** /wire account offline signing **************** */ /** |