diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-11-25 17:50:37 +0200 | 
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-11-25 17:50:37 +0200 | 
| commit | 5a6c232bf83f10a490890b3db8f01f44eee8aa9a (patch) | |
| tree | 9f939974e1828d4d3be851a87c655caf90e229e7 /ospf6d/ospf6_route.c | |
| parent | 92ef0078787337fbb7be53f9d39ece6ee06c5148 (diff) | |
ospf6d: Convert vty_out to vty_json for JSON
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'ospf6d/ospf6_route.c')
| -rw-r--r-- | ospf6d/ospf6_route.c | 15 | 
1 files changed, 3 insertions, 12 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 92fcbf71e8..880987b3f3 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -1611,10 +1611,7 @@ int ospf6_route_table_show(struct vty *vty, int argc_start, int argc,  	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); +			vty_json(vty, json);  		}  		return CMD_SUCCESS;  	} @@ -1630,10 +1627,7 @@ int ospf6_route_table_show(struct vty *vty, int argc_start, int argc,  						      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); +			vty_json(vty, json);  		}  		return CMD_SUCCESS;  	} @@ -1648,10 +1642,7 @@ int ospf6_route_table_show(struct vty *vty, int argc_start, int argc,  		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); +		vty_json(vty, json);  	}  	return CMD_SUCCESS;  }  | 
