ovs-vsctl: Add options parsing infrastructure.
[openvswitch] / lib / json.c
index c31f418af07e0c814c1c3f9e83e50174c22f9469..d162fd5143bfc9e8cd3994007655c46ccca989f8 100644 (file)
@@ -222,6 +222,14 @@ json_array_create(struct json **elements, size_t n)
     return json;
 }
 
+struct json *
+json_array_create_1(struct json *elem0)
+{
+    struct json **elems = xmalloc(sizeof *elems);
+    elems[0] = elem0;
+    return json_array_create(elems, 1);
+}
+
 struct json *
 json_array_create_2(struct json *elem0, struct json *elem1)
 {