[syslog-ng] [PATCH] json-parser: Change the way arrays are formatted

Gergely Nagy algernon at balabit.hu
Sat Mar 31 23:05:10 CEST 2012


Balazs Scheidler <bazsi at balabit.hu> writes:

> On Fri, 2012-03-30 at 09:18 +0200, Gergely Nagy wrote:
>> Instead of parsing an array into key-value pairs where the key has a
>> suffix of a dot, followed by the array index, make the key resemble
>> the javascript array syntax: array[index].
>> 
>> This makes it more intuitive to reach into arrays, and also makes it
>> easier to discover arrays when formatting back to JSON.
>> 
>> Signed-off-by: Gergely Nagy <algernon at balabit.hu>
>> ---
>
> Applied, thanks.
>
> NOTE: you might want to get rid off those g_string_printf() calls. Those
> are _slow_.

It's on my TODO list, but I'm saving these for times when I need
something quick & easy to fix.

-- 
|8]



More information about the syslog-ng mailing list