logstash-plugins/logstash-filter-json

If the JSON parser fails and the source is the same as the target, the error message removes the source

edhgoose opened this issue · 0 comments

I'm trying to parse some JSON, overwriting the source with the destination.

The parsing is failing, causing an exception, which gives a trimmed message of:

.... :source=>"extra", :raw=>{}, :exception=>#<JSON::ParserError: unexpected token at ' ...

The :raw=>{} confused me, but I believe the issue is that the source is overwritten with an empty {} to start with.

The simple workaround is to not overwrite the source at the moment, but it'd be good if this was less confusing.