From 5b9cce9fd0a1da9aeaaba8465f9a2780282a2247 Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Tue, 8 Oct 2019 15:54:31 +0200 Subject: Add function to add one json array to another one Add a function to add one json array to another one. The json array to add can be inserted at any place of the json array to complete using 'idx' parameter. Also, correct minor mistake in 'wrap_json_object_add' description. BUG-AGL: SPEC-2867 Change-Id: I8936f298a4499f265646a75584d7fe6b29700513 Signed-off-by: Jonathan Aillet --- wrap-json.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'wrap-json.h') diff --git a/wrap-json.h b/wrap-json.h index f43659a..6415119 100644 --- a/wrap-json.h +++ b/wrap-json.h @@ -51,6 +51,8 @@ extern struct json_object *wrap_json_clone_depth(struct json_object *object, int extern struct json_object *wrap_json_object_add(struct json_object *dest, struct json_object *added); +extern struct json_object *wrap_json_array_insert_array(struct json_object *dest, struct json_object *added, int idx); + extern struct json_object *wrap_json_sort(struct json_object *array); extern struct json_object *wrap_json_keys(struct json_object *object); extern int wrap_json_cmp(struct json_object *x, struct json_object *y); -- cgit 1.2.3-korg