json_object *json_cluster_list = NULL;
json_object *json_cluster_list_list = NULL;
json_object *json_ext_community = NULL;
+ json_object *json_lcommunity = NULL;
json_object *json_last_update = NULL;
json_object *json_nexthop_global = NULL;
json_object *json_nexthop_ll = NULL;
}
/* Line 6 display Large community */
- if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES))
- vty_out(vty, " Large Community: %s\n",
- attr->lcommunity->str);
+ if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES)) {
+ if (json_paths) {
+ json_lcommunity = json_object_new_object();
+ json_object_string_add(json_lcommunity,
+ "string",
+ attr->lcommunity->str);
+ json_object_object_add(json_path,
+ "largeCommunity",
+ json_lcommunity);
+ } else {
+ vty_out(vty, " Large Community: %s\n",
+ attr->lcommunity->str);
+ }
+ }
/* Line 7 display Originator, Cluster-id */
if ((attr->flag & ATTR_FLAG_BIT(BGP_ATTR_ORIGINATOR_ID))