jsoninfo: in /plugins show parameters as name/value
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 9 Mar 2016 15:03:33 +0000 (16:03 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 9 Mar 2016 15:03:44 +0000 (16:03 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/jsoninfo/src/olsrd_jsoninfo.c

index 3e4fb81..3ddfcf4 100644 (file)
@@ -1003,7 +1003,8 @@ void ipc_print_plugins(struct autobuf *abuf) {
       abuf_json_mark_object(true, true, abuf, "parameters");
       for (param = plugin->params; param; param = param->next) {
         abuf_json_mark_array_entry(true, abuf);
-        abuf_json_string(abuf, param->key, param->value);
+        abuf_json_string(abuf, "name", param->key);
+        abuf_json_string(abuf, "value", param->value);
         abuf_json_mark_array_entry(false, abuf);
       }
       abuf_json_mark_object(false, true, abuf, NULL);