From fe0d1ede9d3e2fe9215eae855d09780f7468f094 Mon Sep 17 00:00:00 2001 From: Jafar Al-Gharaibeh Date: Fri, 13 Sep 2024 23:32:56 -0500 Subject: [PATCH] pimd: use vty_json Signed-off-by: Jafar Al-Gharaibeh --- pimd/pim_cmd_common.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pimd/pim_cmd_common.c b/pimd/pim_cmd_common.c index 567cb5b46a5b..2f46fcac9b20 100644 --- a/pimd/pim_cmd_common.c +++ b/pimd/pim_cmd_common.c @@ -5567,10 +5567,7 @@ int pim_show_bsr_cand_bsr(const struct vrf *vrf, struct vty *vty, bool uj) json_object_boolean_add(jsondata, "elected", pim->global_scope.state == BSR_ELECTED); - vty_out(vty, "%s\n", - json_object_to_json_string_ext(jsondata, - JSON_C_TO_STRING_PRETTY)); - json_object_free(jsondata); + vty_json(vty, jsondata); return CMD_SUCCESS; }