summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6d.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6d.c')
-rw-r--r--ospf6d/ospf6d.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c
index 5e6dcde991..d9f730586b 100644
--- a/ospf6d/ospf6d.c
+++ b/ospf6d/ospf6d.c
@@ -292,10 +292,7 @@ static void ospf6_lsdb_show_wrapper(struct vty *vty,
json_object_array_add(json_array, json_obj);
json_object_object_add(json, "asScopedLinkStateDb", json_array);
- 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);
} else
vty_out(vty, "\n");
}
@@ -386,12 +383,9 @@ static void ospf6_lsdb_type_show_wrapper(struct vty *vty,
assert(0);
break;
}
- if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
- json_object_free(json);
- } else
+ if (uj)
+ vty_json(vty, json);
+ else
vty_out(vty, "\n");
}