[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160531115955.4a45ff67@xeon-e3>
Date: Tue, 31 May 2016 11:59:55 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Roopa Prabhu <roopa@...ulusnetworks.com>
Cc: netdev@...r.kernel.org, anuradhak@...ulusnetworks.com,
nikolay@...ulusnetworks.com, julien@...ulusnetworks.com
Subject: Re: [PATCH iproute2 net-next 3/5] bridge: add json support for
bridge fdb show
On Fri, 27 May 2016 21:37:14 -0700
Roopa Prabhu <roopa@...ulusnetworks.com> 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.
Powered by blists - more mailing lists