summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2017-09-13 15:50:25 -0700
committerBen Pfaff <blp@ovn.org>2017-10-24 16:09:17 -0700
commit52a9c55d558a68cd70391961ab561b01417464ff (patch)
tree3c16035fe5ec79f4583da267294b36ea1ac3c657 /include
parentd697750af6e81c2a68a3b8b552a5ed98380e7d54 (diff)
downloadopenvswitch-52a9c55d558a68cd70391961ab561b01417464ff.tar.gz
json: New function json_object_put_format().
This will acquire users in an upcoming commit. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org>
Diffstat (limited to 'include')
-rw-r--r--include/openvswitch/json.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/openvswitch/json.h b/include/openvswitch/json.h
index edf53e594..61b9a02cf 100644
--- a/include/openvswitch/json.h
+++ b/include/openvswitch/json.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, 2015 Nicira, Inc.
+ * Copyright (c) 2009, 2010, 2015, 2016 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,6 +38,7 @@ extern "C" {
#endif
struct ds;
+struct uuid;
/* Type of a JSON value. */
enum json_type {
@@ -92,6 +93,9 @@ struct json *json_object_create(void);
void json_object_put(struct json *, const char *name, struct json *value);
void json_object_put_string(struct json *,
const char *name, const char *value);
+void json_object_put_format(struct json *,
+ const char *name, const char *format, ...)
+ OVS_PRINTF_FORMAT(3, 4);
const char *json_string(const struct json *);
struct json_array *json_array(const struct json *);