diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-11-25 16:50:37 +0100 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-11-25 16:50:37 +0100 |
commit | 5a6c232bf83f10a490890b3db8f01f44eee8aa9a (patch) | |
tree | 9f939974e1828d4d3be851a87c655caf90e229e7 /ospf6d/ospf6_neighbor.c | |
parent | ospfd: Convert vty_out to vty_json for JSON (diff) | |
download | frr-5a6c232bf83f10a490890b3db8f01f44eee8aa9a.tar.xz frr-5a6c232bf83f10a490890b3db8f01f44eee8aa9a.zip |
ospf6d: Convert vty_out to vty_json for JSON
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'ospf6d/ospf6_neighbor.c')
-rw-r--r-- | ospf6d/ospf6_neighbor.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index 8ec916dba..ad33c57db 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -1073,10 +1073,7 @@ static void ospf6_neighbor_show_detail_common(struct vty *vty, json_object_object_add(json, "neighbors", json_array); else json_object_free(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); } } @@ -1149,10 +1146,7 @@ static int ospf6_neighbor_show_common(struct vty *vty, int argc, } 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; |