logstash-plugins / logstash-codec-json

Apache License 2.0
23 stars 29 forks source link

Fix: json parsing compatibility + freeze event.original value #38

Closed kares closed 3 years ago

kares commented 3 years ago

In 1.0.0 the mixin shipped with a JSON parsing helper, this method did not parse empty strings in a compatible way. The desired behavior is to parse "" as a nil and raise no error while doing so (to behave like Event.from_json impl).

Pulling in https://github.com/logstash-plugins/logstash-mixin-event_support/pull/3 on top of https://github.com/logstash-plugins/logstash-codec-json/pull/37

Also added value.dup.freeze for event.original's value.

NOTE: we haven't released 3.1.0 yet - this PR will be part of the same release.