Re: [PATCH 0/2] routines to generate JSON data

2018-03-20 Thread Jeff Hostetler
On 3/20/2018 1:42 AM, Jeff King wrote: On Mon, Mar 19, 2018 at 06:19:26AM -0400, Jeff Hostetler wrote: To make the above work, I think you'd have to store a little more state. E.g., the "array_append" functions check "out->len" to see if they need to add a separating comma. That wouldn't

Re: [PATCH 0/2] routines to generate JSON data

2018-03-19 Thread Jeff King
On Sat, Mar 17, 2018 at 12:00:26AM +0100, Ævar Arnfjörð Bjarmason wrote: > > On Fri, Mar 16 2018, Jeff King jotted: > > > I really like the idea of being able to send our machine-readable output > > in some "standard" syntax for which people may already have parsers. But > > one big hangup with

Re: [PATCH 0/2] routines to generate JSON data

2018-03-19 Thread Jeff King
On Mon, Mar 19, 2018 at 06:19:26AM -0400, Jeff Hostetler wrote: > > To make the above work, I think you'd have to store a little more state. > > E.g., the "array_append" functions check "out->len" to see if they need > > to add a separating comma. That wouldn't work if we might be part of a > >

Re: [PATCH 0/2] routines to generate JSON data

2018-03-19 Thread Jeff Hostetler
On 3/17/2018 3:38 AM, Jacob Keller wrote: On Fri, Mar 16, 2018 at 2:18 PM, Jeff King wrote: 3. Some other similar format. YAML comes to mind. Last time I looked (quite a while ago), it seemed insanely complex, but I think you could implement only a reasonable

Re: [PATCH 0/2] routines to generate JSON data

2018-03-19 Thread Jeff Hostetler
On 3/16/2018 5:18 PM, Jeff King wrote: On Fri, Mar 16, 2018 at 07:40:55PM +, g...@jeffhostetler.com wrote: [...] I really like the idea of being able to send our machine-readable output in some "standard" syntax for which people may already have parsers. But one big hangup with JSON is

Re: [PATCH 0/2] routines to generate JSON data

2018-03-17 Thread Jacob Keller
On Fri, Mar 16, 2018 at 2:18 PM, Jeff King wrote: > 3. Some other similar format. YAML comes to mind. Last time I looked > (quite a while ago), it seemed insanely complex, but I think you > could implement only a reasonable subset. OTOH, I think the tools >

Re: [PATCH 0/2] routines to generate JSON data

2018-03-16 Thread Ævar Arnfjörð Bjarmason
On Fri, Mar 16 2018, Jeff King jotted: > I really like the idea of being able to send our machine-readable output > in some "standard" syntax for which people may already have parsers. But > one big hangup with JSON is that it assumes all strings are UTF-8. FWIW It's not UTF-8 but "Unicode

Re: [PATCH 0/2] routines to generate JSON data

2018-03-16 Thread Jeff King
On Fri, Mar 16, 2018 at 07:40:55PM +, g...@jeffhostetler.com wrote: > This patch series adds a set of utility routines to compose data in JSON > format into a "struct strbuf". The resulting string can then be output > by commands wanting to support a JSON output format. > > This is a stand

[PATCH 0/2] routines to generate JSON data

2018-03-16 Thread git
From: Jeff Hostetler This patch series adds a set of utility routines to compose data in JSON format into a "struct strbuf". The resulting string can then be output by commands wanting to support a JSON output format. This is a stand alone patch. Nothing currently uses