From 5a6c232bf83f10a490890b3db8f01f44eee8aa9a Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 25 Nov 2021 17:50:37 +0200 Subject: ospf6d: Convert vty_out to vty_json for JSON Signed-off-by: Donatas Abraitis --- ospf6d/ospf6_route.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'ospf6d/ospf6_route.c') diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 92fcbf71e8..880987b3f3 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -1611,10 +1611,7 @@ int ospf6_route_table_show(struct vty *vty, int argc_start, int argc, if (summary) { ospf6_route_show_table_summary(vty, table, json, use_json); if (use_json) { - 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; } @@ -1630,10 +1627,7 @@ int ospf6_route_table_show(struct vty *vty, int argc_start, int argc, use_json); if (use_json) { - 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; } @@ -1648,10 +1642,7 @@ int ospf6_route_table_show(struct vty *vty, int argc_start, int argc, ospf6_route_show_table(vty, detail, table, json, use_json); if (use_json) { - 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; } -- cgit v1.2.3