Re: [PATCH v5] json_writer: new routines to create data in JSON format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 27, 2018 at 2:02 PM <git@xxxxxxxxxxxxxxxxx> wrote:
>
> From: Jeff Hostetler <jeffhost@xxxxxxxxxxxxx>
>
> Add a series of jw_ routines and "struct json_writer" structure to compose
> JSON data.  The resulting string data can then be output by commands wanting
> to support a JSON output format.

<snip>

>
>
>
>  void jw_object_intmax(struct json_writer *jw, const char *key, intmax_t value)
> +{
> +       object_common(jw, key);
> +       strbuf_addf(&jw->json, "%"PRIdMAX, (intmax_t)value);

Cast is not necessary.

> +}
> +

<snip>

>
> +void jw_array_intmax(struct json_writer *jw, intmax_t value)
> +{
> +       array_common(jw);
> +       strbuf_addf(&jw->json, "%"PRIdMAX, (intmax_t)value);

Cast is not necessary

>
> +}
> +

<snip>

-- Wink



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux