2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

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>
This commit is contained in:
Ben Pfaff
2017-09-13 15:50:25 -07:00
parent d697750af6
commit 52a9c55d55
2 changed files with 17 additions and 1 deletions

View File

@@ -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 *);