From a2339ed9e31b88e2f7f83297e270fbb2fe09a88a Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah Date: Sun, 17 May 2020 10:57:35 -0700 Subject: lib, bgpd: move json_array_string_add to lib json_array_string_add is used to add a string entry into a JSON list. This API is needed by zebra so moving it from bgpd to lib. Signed-off-by: Anuradha Karuppiah --- lib/json.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/json.c') 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) { -- cgit v1.2.3