logstash-plugins / logstash-codec-json

Apache License 2.0
23 stars 29 forks source link

Json codec builds nested fields when field name contains square brackets #19

Open ofirnn opened 8 years ago

ofirnn commented 8 years ago

Hi,

Facing problem (upgrading from 1.4.2 to 2.0 that occurs when field have brackets inside (valid JSON)

example: { "dynamo_entry_tuple_in_list[0]_list[0]": "valid-value" }

is converted to:

{ "dynamo_entry_tuple_inlist" : {"0.list":{"1":null,"0":null}} }

because my fields contains dots (removed in "de_dot") I'm unable to rename them in filter - it becomes nested.

untergeek commented 8 years ago

because my fields contains dots (removed in "de_dot") I'm unable to rename them in filter - it becomes nested.

Whenever possible, de_dot should be the last filter of a pipeline to avoid such issues.