summaryrefslogtreecommitdiffstats
path: root/sharpd
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-11-25 16:49:56 +0100
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-11-25 16:49:56 +0100
commit7297350e61659aefdfb6757e24de8a23db1adeaa (patch)
tree839c88ec5af0fc85575d41122de18273f6a5a263 /sharpd
parentzebra: Convert vty_out to vty_json for JSON (diff)
downloadfrr-7297350e61659aefdfb6757e24de8a23db1adeaa.tar.xz
frr-7297350e61659aefdfb6757e24de8a23db1adeaa.zip
sharpd: Convert vty_out to vty_json for JSON
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'sharpd')
-rw-r--r--sharpd/sharp_vty.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c
index b6581cd9e..3485d172b 100644
--- a/sharpd/sharp_vty.c
+++ b/sharpd/sharp_vty.c
@@ -1066,10 +1066,7 @@ DEFUN (show_sharp_ted,
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
- json_object_free(json);
+ vty_json(vty, json);
}
return CMD_SUCCESS;
@@ -1137,9 +1134,7 @@ DEFPY (show_sharp_segment_routing_srv6,
}
}
- vty_out(vty, "%s\n", json_object_to_json_string_ext(
- jo_locs, JSON_C_TO_STRING_PRETTY));
- json_object_free(jo_locs);
+ vty_json(vty, jo_locs);
} else {
for (ALL_LIST_ELEMENTS_RO(sg.srv6_locators, loc_node, loc)) {
vty_out(vty, "Locator %s has %d prefix chunks\n",