You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
JSON output from some "show" commands is malformed and are note considered as valid JSON. It is visible on "show ip prefix-list <prefix_list_name> json" and "show route-map <route_map> json" commands, but I believe this is present in many cases.
There are 2 consecutive JSON objects concatenated, one from the Zebra perspective, and another one for BGP. The problem is that these objects are not in a list, making it an invalid JSON output, and make it harder for programs to parse it.
Did you check if this is a duplicate issue?
Did you test it on the latest FRRouting/frr master branch?
To Reproduce
Declare a route-map in your config
Run the following "show route-map <route_map_name> json"
I took the output of show route-map json and put it in several online json validators and got a it's valid from the ones I've used. Looking at the code, this was fixed last november with commit:
commit 570fdc55fd65899cd4376193e833594af6bca093
Author: Rafael Zalamena <[email protected]>
Date: Mon Nov 20 17:32:19 2023 -0300
lib,vtysh: fix show route map JSON output
Move the command from 'lib' to 'vtysh' so we can properly format the
JSON output in a correct manner.
Signed-off-by: Rafael Zalamena <[email protected]>
This commit was also backported to the 9.1 and 9.0 releases. Please ensure you ahve this commit
Could you re-open the issue please ?
Indeed, this commit fixes the issue for the show route-map json command but not for others. As I mentioned in my original post, there is the exact same issue for the show ip prefix-list json command for instance.
So there is a lack of consistency on JSON outputs between "show" commands.
Describe the bug
JSON output from some "show" commands is malformed and are note considered as valid JSON. It is visible on "show ip prefix-list <prefix_list_name> json" and "show route-map <route_map> json" commands, but I believe this is present in many cases.
There are 2 consecutive JSON objects concatenated, one from the Zebra perspective, and another one for BGP. The problem is that these objects are not in a list, making it an invalid JSON output, and make it harder for programs to parse it.
To Reproduce
example:
Expected behavior
Wrap the JSON objects in a list, that would make it a valid JSON output:
Versions
Additional context
The text was updated successfully, but these errors were encountered: