<div dir="ltr"><div><div><div>Hi,<br><br></div>Hmm, it was a feature to handle zero length values properly, and at the same time I've added the unset() rewrite operation, which causes name-value pairs to be omitted.<br><br></div>It might make sense to add a --skip-empty-values or similar option to $(format-json), would that solve your problem? Can you elaborate your use-case?<br><br></div>Thanks<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <br>Bazsi<br></div></div></div>
<br><div class="gmail_quote">On Tue, May 22, 2018 at 7:50 AM, Nik Ambrosch <span dir="ltr"><<a href="mailto:nik@ambrosch.com" target="_blank">nik@ambrosch.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi - I'm trying to figure out how to instruct json-parser() to exclude empty (or nonexistent) json pairs from being passed to it's template.  This is possible with the csv parser using null("") but not json.</div><div><br></div><div>It seems that if i specify all my json-parser() pairs using --pair example=\"${MYMACRO}\" the desired behavior is achieved, however using --scope nv-pairs instead will log the empty values.</div><br></div>
<br>______________________________<wbr>______________________________<wbr>__________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/<wbr>mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/<wbr>support/documentation/?<wbr>product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/<wbr>syslog-ng-faq</a><br>
<br>
<br></blockquote></div><br></div>