Re: [PATCH v8 1/2] json_writer: new routines to create data in JSON format

2018-06-11 Thread Jeff Hostetler
On 6/8/2018 4:07 PM, René Scharfe wrote: Am 07.06.2018 um 16:12 schrieb g...@jeffhostetler.com: From: Jeff Hostetler [...] + if (jw->first_stack.buf[jw->first_stack.len - 1] == '1') + jw->first_stack.buf[jw->first_stack.len - 1] = '0'; + else +

Re: [PATCH v8 1/2] json_writer: new routines to create data in JSON format

2018-06-11 Thread Jeff Hostetler
On 6/8/2018 2:05 AM, René Scharfe wrote: Am 07.06.2018 um 16:12 schrieb g...@jeffhostetler.com: From: Jeff Hostetler Add a series of jw_ routines and "struct json_writer" structure to compose [...] TEST_PROGRAMS_NEED_X += test-index-version +TEST_PROGRAMS_NEED_X += test-json-writer>

Re: [PATCH v8 1/2] json_writer: new routines to create data in JSON format

2018-06-11 Thread Jeff Hostetler
On 6/8/2018 4:32 PM, René Scharfe wrote: Am 07.06.2018 um 16:12 schrieb g...@jeffhostetler.com: Makefile| 2 + json-writer.c | 419 json-writer.h | 113 + t/helper/test-json-writer.c | 572

Re: [PATCH v8 1/2] json_writer: new routines to create data in JSON format

2018-06-08 Thread René Scharfe
Am 07.06.2018 um 16:12 schrieb g...@jeffhostetler.com: > Makefile| 2 + > json-writer.c | 419 > json-writer.h | 113 + > t/helper/test-json-writer.c | 572 >

Re: [PATCH v8 1/2] json_writer: new routines to create data in JSON format

2018-06-08 Thread Jeff Hostetler
On 6/7/2018 1:24 PM, Eric Sunshine wrote: On Thu, Jun 7, 2018 at 10:12 AM, wrote: 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. [...] Signed-off-by:

Re: [PATCH v8 1/2] json_writer: new routines to create data in JSON format

2018-06-08 Thread René Scharfe
Am 07.06.2018 um 16:12 schrieb g...@jeffhostetler.com: > From: Jeff Hostetler > +/* > + * Add comma if we have already seen a member at this level. > + */ > +static inline void maybe_add_comma(struct json_writer *jw) > +{ > + if (!jw->open_stack.len) > + return; This is

Re: [PATCH v8 1/2] json_writer: new routines to create data in JSON format

2018-06-08 Thread René Scharfe
Am 07.06.2018 um 16:12 schrieb g...@jeffhostetler.com: > From: Jeff Hostetler > > 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. > > The json-writer

Re: [PATCH v8 1/2] json_writer: new routines to create data in JSON format

2018-06-07 Thread Eric Sunshine
On Thu, Jun 7, 2018 at 10:12 AM, wrote: > 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. > [...] > Signed-off-by: Jeff Hostetler > --- > diff --git

[PATCH v8 1/2] json_writer: new routines to create data in JSON format

2018-06-07 Thread git
From: Jeff Hostetler 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. The json-writer routines can be used to generate structured data in a JSON-like format.