linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nicolas Escande" <nico.escande@gmail.com>
To: "Johannes Berg" <johannes@sipsolutions.net>,
	"Isaev Ruslan" <legale.legale@gmail.com>,
	<linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v12] Add JSON output options to 'iw' for scan results
Date: Tue, 26 Mar 2024 09:51:50 +0100	[thread overview]
Message-ID: <D03JY73HKNJ3.2IV95NSJ4PCZS@gmail.com> (raw)
In-Reply-To: <f3ab160dd84e936134c6aa60e2f6d0fcf4d61e4c.camel@sipsolutions.net>

On Mon Mar 25, 2024 at 5:32 PM CET, Johannes Berg wrote:
[...]
>
> And that stuff is a really pointless output in JSON, for JSON it'd be
> much more useful to output an object with actual (integer) values, and a
> flag to indicate 'basic', or something.
>
> Anyway ... I think you're hyper-focused on exactly the wrong thing.
>
> Arguably, for scan results, the right thing to do would be to just
> output the raw elements in the JSON, and not do any of this parsing.
> Then you can use your favourite parsing library (dpkt? tshark? ...) to
> actually understand the data there. We really don't need to expose the
> element parsing logic of iw, especially not in a bad way like this.
>
> Also, outputting the *string* data in a machine-readable format like you
> do now has very little value, and yet it ties us to a specific output
> format that we'd probably have to consider stable. Bad idea.
>
> So I guess I'm saying yhou should abandon this line of changes in this
> code entirely.
>
> Much more interesting, IMHO, would be to focus in pretty much anything
> _else_ in the iw code, e.g. the output of 'iw dev', 'iw wlan0 info',
> statistics, etc. Maybe 'iw list' and similar too.
>
> Although I suspect that what we really need is better access for tools
> from nl80211. Maybe the "JSON" output format should just dump the raw
> nl80211 message attributes that are involved, or something.
>

+ 1 on this one. The whole goal of json is to be machine readable, it should not
be just be the same output as iw (which is text/user readable) but with json
syntax / separators insted of \n & \t

> johannes


      parent reply	other threads:[~2024-03-26  8:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-10  1:21 [PATCH v12] Add JSON output options to 'iw' for scan results Isaev Ruslan
2024-03-25 16:32 ` Johannes Berg
2024-03-26  6:46   ` python nl80211 libraries? Kalle Valo
2024-03-26  8:51   ` Nicolas Escande [this message]

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=D03JY73HKNJ3.2IV95NSJ4PCZS@gmail.com \
    --to=nico.escande@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=legale.legale@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /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).