[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221223115049.12b985b1@kernel.org>
Date: Fri, 23 Dec 2022 11:50:49 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Francois Romieu <romieu@...zoreil.com>
Cc: "Mogilappagari, Sudheer" <sudheer.mogilappagari@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"mkubecek@...e.cz" <mkubecek@...e.cz>,
"andrew@...n.ch" <andrew@...n.ch>,
"corbet@....net" <corbet@....net>,
"Samudrala, Sridhar" <sridhar.samudrala@...el.com>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
stephen@...workplumber.org
Subject: Re: [PATCH ethtool-next v2 2/2] netlink: add netlink handler for
get rss (-x)
On Fri, 23 Dec 2022 12:08:16 +0100 Francois Romieu wrote:
> > Hex would be great, but AFAIR JSON does not support hex :(
> > Imagine dealing with this in python, or bash. Do you really
> > want the values to be strings? They will have to get converted
> > manually to integers. So I think just making them integers is
> > best, JSON is for machines not for looking at...
>
> 'ip' json output does not use the suggested format.
>
> It may be interesting to know if the experience proved it to be
> a poor choice.
Hopefully without sounding impolite let me clarify that it is precisely
*experience* using the JSON output of ip extensively in Python and Ruby
(chef) which leads me to make the suggestion.
I made the same mistake in bpftool's JSON output, formatting binary
data as hex strings so it "looks nice" :(
Unfortunately we consider JSON output to be uAPI-like so we can't
change the format now :(
Powered by blists - more mailing lists