summaryrefslogtreecommitdiff
path: root/lib/json.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-04-14 14:36:21 -0400
committerGitHub <noreply@github.com>2020-04-14 14:36:21 -0400
commitb9ba7ed5333545e774f8634c32872a16ab2653e3 (patch)
treefefa930f7c0d8cc92b4095882abb3d070dd9c8c9 /lib/json.c
parent0b4b9672b737c8fb75346523819215ca77d88288 (diff)
parent9ab0cf5830bf9680cabd8ddc24b26c34643e148b (diff)
Merge pull request #5812 from pguibert6WIND/bgp_stats_all
Bgp stats all
Diffstat (limited to 'lib/json.c')
-rw-r--r--lib/json.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/json.c b/lib/json.c
index 991240639a..6bea3982e3 100644
--- a/lib/json.c
+++ b/lib/json.c
@@ -50,6 +50,11 @@ void json_object_int_add(struct json_object *obj, const char *key, int64_t i)
json_object_object_add(obj, key, json_object_new_int64(i));
}
+void json_object_double_add(struct json_object *obj, const char *key, double i)
+{
+ json_object_object_add(obj, key, json_object_new_double(i));
+}
+
void json_object_boolean_false_add(struct json_object *obj, const char *key)
{
json_object_object_add(obj, key, json_object_new_boolean(0));