[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20150831122004.3a3aba15@urahara>
Date: Mon, 31 Aug 2015 12:20:04 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Matthias Tafelmeier <matthias.tafelmeier@....net>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"hagen@...u.net" <hagen@...u.net>,
"shemminger@...l.org" <shemminger@...l.org>,
"fw@...len.de" <fw@...len.de>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"daniel@...earbox.net" <daniel@...earbox.net>
Subject: Re: [PATCH v4 10/10] ss: extended json_writer for hex field and
value output
> diff --git a/lib/json_writer.c b/lib/json_writer.c
> index 2af16e1..495ce57 100644
> --- a/lib/json_writer.c
> +++ b/lib/json_writer.c
> @@ -22,6 +22,8 @@
>
> #include "json_writer.h"
>
> +#define notused
> +
Gack. Just take out the #ifdef
> struct json_writer {
> FILE *out; /* output file */
> unsigned depth; /* nesting */
> @@ -223,6 +225,14 @@ void jsonw_int(json_writer_t *self, int64_t num)
> jsonw_printf(self, "%"PRId64, num);
> }
>
> +void jsonw_hex(json_writer_t *self, uint64_t num)
> +{
> + char tmp[17];
> +
> + sprintf(tmp, "%"PRIx64, num);
> + jsonw_string(self, tmp);
> +}
> +
No. JSON is a standard. The output has to be one of the formats in the
standard. hex is a display issue not an encoding style.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists