X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Futils-json.h;h=3c4fee3522e9eb73d8b6540c41120096ed44460b;hb=c6b2074e18ce7a37a59bc1c3831407b42b18c889;hp=4b86fa9f264de9aeb91245c75bd19051427cf8bf;hpb=e906126c4e46ad9f3471aee208f096f55289ca03;p=src%2Fapp-framework-main.git diff --git a/src/utils-json.h b/src/utils-json.h index 4b86fa9..3c4fee3 100644 --- a/src/utils-json.h +++ b/src/utils-json.h @@ -1,5 +1,5 @@ /* - Copyright 2015 IoT.bzh + Copyright 2015, 2016 IoT.bzh author: José Bollo @@ -56,9 +56,12 @@ extern int j_integer_at(struct json_object *obj, const char *key, int defval); /* * Adds a keyed value (of type) and returns true if done or false in case of error + * when key==NULL object is an array and values are appended */ extern int j_add(struct json_object *obj, const char *key, struct json_object *val); extern int j_add_string(struct json_object *obj, const char *key, const char *val); extern int j_add_boolean(struct json_object *obj, const char *key, int val); extern int j_add_integer(struct json_object *obj, const char *key, int val); +extern struct json_object *j_add_new_array(struct json_object *obj, const char *key); +extern struct json_object *j_add_new_object(struct json_object *obj, const char *key);