Subject: Re: [PATCH ethtool-next v2 2/2] netlink: add netlink handler for get rss (-x)

From: Jakub Kicinski <[email-masked]>
Date: Fri, 23 Dec 2022 11:50:49 -0800

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 :(