diff options
Diffstat (limited to 'src/backend/taler-mint-httpd_parsing.h')
-rw-r--r-- | src/backend/taler-mint-httpd_parsing.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/backend/taler-mint-httpd_parsing.h b/src/backend/taler-mint-httpd_parsing.h index d6a2b4ea..dae65092 100644 --- a/src/backend/taler-mint-httpd_parsing.h +++ b/src/backend/taler-mint-httpd_parsing.h @@ -139,7 +139,13 @@ enum TMH_PARSE_JsonNavigationCommand * encoded as a JSON integer. * Param: uint64_t * */ - TMH_PARSE_JNC_RET_UINT64 + TMH_PARSE_JNC_RET_UINT64, + /** + * Return a 'char *' as returned from 'json_string_value ()'. + * So it will live as long as the containg JSON is not freed, + * and must not be freed by the user + */ + TMH_PARSE_JNC_RET_STRING }; @@ -265,7 +271,18 @@ TMH_PARSE_member_variable (const char *field, void **ptr, size_t *ptr_size); - +/** + * Generate line in parser specification for string. The returned + * string is already nul-terminated internally by JSON, so no length + * information is provided. The string will live as long as the containg + * JSON will, and must not be freed by the user + * @param field name of the field + * @param[out] pointer to the string + * @return corresponding field spec + */ +struct TMH_PARSE_FieldSpecification +TMH_PARSE_member_string (const char *field, + char **out); /** * Generate line in parser specification for 64-bit integer * given as an integer in JSON. |