The json format for json routes should be compliant with caml format.
Before:
> "Prefix|Metric|Interface|Nexthop|SID|LabelOp|Algo":
> "Prefix|Metric|Interface|Nexthop|Label(s)");
After:
> "prefix|metric|interface|nextHop|segmentIdentifier|labelOperation|Algorithm":
> "prefix|metric|interface|nextHop|label(s)");
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
vty_out(vty, "%s\n", table);
XFREE(MTYPE_TMP, table);
} else if (json) {
- *json = ttable_json(tt, prefix_sid ? "sdssdsdd" : "sdsss");
+ *json = ttable_json_with_json_text(
+ tt, prefix_sid ? "sdssdsdd" : "sdsss",
+ prefix_sid
+ ? "prefix|metric|interface|nextHop|segmentIdentifier|labelOperation|Algorithm"
+ : "prefix|metric|interface|nextHop|label(s)");
}
ttable_del(tt);
}