Subject: Re: [PATCH iproute2 net-next 3/5] bridge: add json support for bridge fdb show

From: Stephen Hemminger <[email-masked]>
Date: Tue, 31 May 2016 11:59:55 -0700

On Fri, 27 May 2016 21:37:14 -0700
Roopa Prabhu <[email-masked]> wrote:

> Sample output:
> $bridge -j fdb show
> [{
>         "mac": "44:38:39:00:69:88",
>         "dev": "swp2s0",
>         "vlan": 2,
>         "master": "br0",
>         "state": "permanent"
>     },{
>         "mac": "00:02:00:00:00:01",
>         "dev": "swp2s0",
>         "vlan": 2,
>         "master": "br0"
>     },{
>         "mac": "00:02:00:00:00:02",
>         "dev": "swp2s1",
>         "vlan": 2,
>         "master": "br0"
>     },{
>         "mac": "44:38:39:00:69:89",
>         "dev": "swp2s1",
>         "master": "br0",
>         "state": "permanent"
>     },{
>         "mac": "44:38:39:00:69:89",
>         "dev": "swp2s1",
>         "vlan": 2,
>         "master": "br0",
>         "state": "permanent"
>     },{
>         "mac": "44:38:39:00:69:88",
>         "dev": "br0",
>         "master": "br0",
>         "state": "permanent"
>     }
>     ]

In most JSON I have seen, the output would be:

{
  "fdb" : [
     {
         "mac": "44:38:39:00:69:88",
         "dev": "swp2s0",
         "vlan": 2,
         "master": "br0",
         "state": "permanent"
     },
...
   ]
}

I.e never a bare array.