diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-02-20 19:04:34 +0000 | 
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-17 00:27:08 +0000 | 
| commit | e91c9247eb43ea5b743ead19edc323bd679c0cd5 (patch) | |
| tree | 0eb49a087837ebc5d3946e67331cc063145a7bc8 /lib/json.c | |
| parent | 929c5fb33ae40ccb30eb986e74716aa9ac130959 (diff) | |
lib: add more convenient boolean adder for json
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/json.c')
| -rw-r--r-- | lib/json.c | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/json.c b/lib/json.c index 4ea20ba178..efc3794040 100644 --- a/lib/json.c +++ b/lib/json.c @@ -64,6 +64,11 @@ void json_object_boolean_true_add(struct json_object *obj, const char *key)  	json_object_object_add(obj, key, json_object_new_boolean(1));  } +void json_object_boolean_add(struct json_object *obj, const char *key, bool val) +{ +	json_object_object_add(obj, key, json_object_new_boolean(val)); +} +  struct json_object *json_object_lock(struct json_object *obj)  {  	return json_object_get(obj);  | 
