Re: [PATCH iproute2-next 3/7] ip: add json support to ip rule

2018-03-06 Thread Stephen Hemminger
On Tue, 6 Mar 2018 09:51:29 -0700 David Ahern wrote: > NULL for detached value seems weird. > [ { > "priority": 998, > "src": "all", > "iif": "dummy2", > "iif_detached": null, > "table": "1" > }, > > Is that normal for json for

Re: [PATCH iproute2-next 3/7] ip: add json support to ip rule

2018-03-06 Thread David Ahern
On 3/5/18 8:04 PM, Stephen Hemminger wrote: > @@ -202,50 +202,66 @@ int print_rule(const struct sockaddr_nl *who, struct > nlmsghdr *n, void *arg) > if (!filter_nlmsg(n, tb, host_len)) > return 0; > > + open_json_object(NULL); > if (n->nlmsg_type == RTM_DELRULE) >

[PATCH iproute2-next 3/7] ip: add json support to ip rule

2018-03-05 Thread Stephen Hemminger
From: Stephen Hemminger More JSON and colorizing. Signed-off-by: Stephen Hemminger --- ip/iprule.c | 203 ++-- 1 file changed, 130 insertions(+), 73 deletions(-) diff --git