Re: [PATCH v9] json_writer: new routines to create JSON data

2018-06-12 Thread Junio C Hamano
g...@jeffhostetler.com writes: > +static void indent_pretty(struct json_writer *jw) > +{ > + int k; > + > + if (!jw->pretty) > + return; > + > + for (k = 0; k < jw->open_stack.len; k++) > + strbuf_addstr(>json, " "); > +} > +static void array_common(struct

Re: [PATCH v9] json_writer: new routines to create JSON data

2018-06-12 Thread Eric Sunshine
On Tue, Jun 12, 2018 at 4:22 PM, wrote: > Add "struct json_writer" and a series of jw_ routines to compose JSON > data into a string buffer. The resulting string may then be printed by > commands wanting to support a JSON-like output format. > > The json_writer is limited to correctly

[PATCH v9] json_writer: new routines to create JSON data

2018-06-12 Thread git
From: Jeff Hostetler Add "struct json_writer" and a series of jw_ routines to compose JSON data into a string buffer. The resulting string may then be printed by commands wanting to support a JSON-like output format. The json_writer is limited to correctly formatting structured data for