diff options
Diffstat (limited to 'main/json.c')
-rw-r--r-- | main/json.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/json.c b/main/json.c index 5b69ccbaa..70830bd13 100644 --- a/main/json.c +++ b/main/json.c @@ -78,6 +78,9 @@ struct ast_json *ast_json_ref(struct ast_json *json) void ast_json_unref(struct ast_json *json) { + if (!json) { + return; + } json_decref((json_t *)json); } @@ -327,6 +330,10 @@ const char *ast_json_object_iter_key(struct ast_json_iter *iter) { return json_object_iter_key(iter); } +struct ast_json_iter *ast_json_object_key_to_iter(const char *key) +{ + return (struct ast_json_iter *)json_object_key_to_iter(key); +} struct ast_json *ast_json_object_iter_value(struct ast_json_iter *iter) { return (struct ast_json *)json_object_iter_value(iter); |