diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/json.c | 5 | ||||
| -rw-r--r-- | lib/json.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/json.c b/lib/json.c index 6bea3982e3..cfba6ea3b6 100644 --- a/lib/json.c +++ b/lib/json.c @@ -39,6 +39,11 @@ bool use_json(const int argc, struct cmd_token *argv[]) return false; } +void json_array_string_add(json_object *json, const char *str) +{ + json_object_array_add(json, json_object_new_string(str)); +} + void json_object_string_add(struct json_object *obj, const char *key, const char *s) { diff --git a/lib/json.h b/lib/json.h index afe0b175da..fe208f4fa9 100644 --- a/lib/json.h +++ b/lib/json.h @@ -57,6 +57,7 @@ extern void json_object_boolean_true_add(struct json_object *obj, const char *key); extern struct json_object *json_object_lock(struct json_object *obj); extern void json_object_free(struct json_object *obj); +extern void json_array_string_add(json_object *json, const char *str); #define JSON_STR "JavaScript Object Notation\n" |
