Subject: Re: [PATCH iproute2-next] ip: ipneigh: json: print ndm_flags as boolean attributes

From: Stephen Hemminger <[email-masked]>
Date: Thu, 26 Dec 2019 09:04:06 -0800

On Thu, 26 Dec 2019 15:44:15 +0100
Julien Fortin <[email-masked]> wrote:

> From: Julien Fortin <[email-masked]>
> 
> Today the following attributes are printed as json "null" attributes
> NTF_ROUTER
> NTF_PROXY
> NTF_EXT_LEARNED
> NTF_OFFLOADED
> 
> $ ip -j neigh show
> [
>   {
>     "dst": "10.0.2.2",
>     "dev": "enp0s3",
>     "lladdr": "52:54:00:12:35:02",
>     "router": null,
>     "proxy": null,
>     "extern_learn": null,
>     "offload": null,
>     "state": [
>       "REACHABLE"
>     ]
>   }
> ]

No, this was intentional. Null is a standard method in JSON
to encode an option being present.