This adds only initial object support if json argument is specified. Later patches convert the current xstats users to json.
Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- ip/iplink_xstats.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ip/iplink_xstats.c b/ip/iplink_xstats.c index 908d9228369f..c64e6885678c 100644 --- a/ip/iplink_xstats.c +++ b/ip/iplink_xstats.c @@ -70,10 +70,13 @@ int iplink_ifla_xstats(int argc, char **argv) return -1; } + new_json_obj(json); if (rtnl_dump_filter(&rth, lu->print_ifla_xstats, stdout) < 0) { + delete_json_obj(); fprintf(stderr, "Dump terminated\n"); return -1; } + delete_json_obj(); return 0; } -- 2.17.2