summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_route.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_route.c')
-rw-r--r--ospf6d/ospf6_route.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c
index 92fcbf71e8..f5d60d80fa 100644
--- a/ospf6d/ospf6_route.c
+++ b/ospf6d/ospf6_route.c
@@ -1610,12 +1610,8 @@ int ospf6_route_table_show(struct vty *vty, int argc_start, int argc,
/* Give summary of this route table */
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);
- }
+ if (use_json)
+ vty_json(vty, json);
return CMD_SUCCESS;
}
@@ -1629,12 +1625,8 @@ int ospf6_route_table_show(struct vty *vty, int argc_start, int argc,
ospf6_route_show_table_prefix(vty, &prefix, 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);
- }
+ if (use_json)
+ vty_json(vty, json);
return CMD_SUCCESS;
}
@@ -1647,12 +1639,8 @@ int ospf6_route_table_show(struct vty *vty, int argc_start, int argc,
else
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);
- }
+ if (use_json)
+ vty_json(vty, json);
return CMD_SUCCESS;
}