netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: David Ahern <dsahern@gmail.com>
Cc: netdev@vger.kernel.org, Stephen Hemminger <sthemmin@microsoft.com>
Subject: Re: [PATCH iproute2-next 3/7] ip: add json support to ip rule
Date: Tue, 6 Mar 2018 08:57:11 -0800	[thread overview]
Message-ID: <20180306085711.65883625@xeon-e3> (raw)
In-Reply-To: <5da46133-9cbb-c8c7-18c1-eab5cebcb6da@gmail.com>

On Tue, 6 Mar 2018 09:51:29 -0700
David Ahern <dsahern@gmail.com> wrote:

> NULL for detached value seems weird.
> [ {
>         "priority": 998,
>         "src": "all",
>         "iif": "dummy2",
>         "iif_detached": null,
>         "table": "1"
>     },
> 
> Is that normal for json for fields that only exist when a value is true?

null is the best way to indicate a value with presence having a meaning.

  reply	other threads:[~2018-03-06 16:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06  3:04 [PATCH iproute2-next 0/7] ip: more JSON Stephen Hemminger
2018-03-06  3:04 ` [PATCH iproute2-next 1/7] ip: add color and json support to neigh Stephen Hemminger
2018-03-06 16:38   ` David Ahern
2018-03-06  3:04 ` [PATCH iproute2-next 2/7] ip: add json support to addrlabel Stephen Hemminger
2018-03-06  3:04 ` [PATCH iproute2-next 3/7] ip: add json support to ip rule Stephen Hemminger
2018-03-06 16:51   ` David Ahern
2018-03-06 16:57     ` Stephen Hemminger [this message]
2018-03-06  3:04 ` [PATCH iproute2-next 4/7] ip: add json support to ntable Stephen Hemminger
2018-03-06 16:53   ` David Ahern
2018-03-06  3:04 ` [PATCH iproute2-next 5/7] ip: add JSON support to netconf Stephen Hemminger
2018-03-06  3:05 ` [PATCH iproute2-next 6/7] tcp_metrics; make tables const Stephen Hemminger
2018-03-06  3:05 ` [PATCH iproute2-next 7/7] ip: jsonify tcp_metrics Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180306085711.65883625@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).