diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-06-27 23:41:31 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-06-27 23:41:31 +0800 |
commit | 65a334cf2fe2d7d524c129f0df765463a91f542c (patch) | |
tree | d182a3e1b474dfd9329357154a1a618a199cdebb /handler.c |
Shipping API client framework
with 1 module so far.
Diffstat (limited to 'handler.c')
-rw-r--r-- | handler.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/handler.c b/handler.c new file mode 100644 index 0000000..581001e --- /dev/null +++ b/handler.c @@ -0,0 +1,13 @@ +#include "handler.h" + +extern inline void handle(const char *, size_t, struct container *); + +void recurse(struct json_object *outer, const char *keys[], struct json_object **services) +{ + struct json_object *inner = NULL; + json_object_object_get_ex(outer, *keys, &inner); + if (*++keys) + recurse(inner, keys, services); + else + *services = inner; +} |