diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-11-25 16:50:12 +0100 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-11-25 16:50:12 +0100 |
commit | 760441ea3a3cdf0902125b1ab94fe52d87d3d1df (patch) | |
tree | dddd795991c67976b9f138ad04a394ab9fff9a5b /pbrd/pbr_vty.c | |
parent | pimd: Convert vty_out to vty_json for JSON (diff) | |
download | frr-760441ea3a3cdf0902125b1ab94fe52d87d3d1df.tar.xz frr-760441ea3a3cdf0902125b1ab94fe52d87d3d1df.zip |
pbrd: Convert vty_out to vty_json for JSON
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | pbrd/pbr_vty.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c index dddca1d72..42a35aeff 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -1038,10 +1038,7 @@ DEFPY (show_pbr_map, } if (j) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - j, JSON_C_TO_STRING_PRETTY)); - json_object_free(j); + vty_json(vty, j); } return CMD_SUCCESS; @@ -1064,11 +1061,7 @@ DEFPY(show_pbr_nexthop_group, if (j) { pbr_nht_json_nexthop_group(j, word); - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - j, JSON_C_TO_STRING_PRETTY)); - - json_object_free(j); + vty_json(vty, j); } else pbr_nht_show_nexthop_group(vty, word); @@ -1143,10 +1136,7 @@ DEFPY (show_pbr_interface, } if (j) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - j, JSON_C_TO_STRING_PRETTY)); - json_object_free(j); + vty_json(vty, j); } return CMD_SUCCESS; |