logstash-filter-json icon indicating copy to clipboard operation
logstash-filter-json copied to clipboard

The JSON filter can extract empty field names, which are then unusable by Logstash

Open nicolasreich opened this issue 4 years ago • 0 comments

Logstash information:

Please include the following information:

  1. Logstash version 7.13
  2. Logstash installation source Official docker

JVM (e.g. java -version): Bundled

OS version (uname -a if on a Unix-like system):

Ubuntu 18

Description of the problem including expected versus actual behavior:

The problem comes from two facts:

  1. An empty string is a valid JSON key, as explained for example in this stackoverflow answer
  2. It isn't possible to access fields with empty names in Logstash.

Steps to reproduce:

Try to handle any JSON with an empty string as a key.

Provide logs (if relevant):

nicolasreich avatar Jun 10 '21 11:06 nicolasreich