1
0
mirror of https://github.com/haiwen/libsearpc.git synced 2025-09-01 12:56:32 +00:00

Support json param type.

This commit is contained in:
Shuai Lin
2016-06-28 12:00:44 +08:00
parent 5fd3bb7176
commit 53a1663d0d
5 changed files with 58 additions and 4 deletions

View File

@@ -79,6 +79,8 @@ fcall_to_str (const char *fname, int n_params, va_list args, gsize *len)
json_array_append_new (array, json_integer (*((gint64 *)value)));
else if (strcmp(type, "string") == 0)
json_array_add_string_or_null_element (array, (char *)value);
else if (strcmp(type, "json") == 0)
json_array_add_json_or_null_element (array, (const json_t *)value);
else {
g_warning ("unrecognized parameter type %s\n", type);
return NULL;