Clever/heka-clever-plugins — pull request #6 by nathanleiby (2014-11-20 21:54:40+00:00)
Title: json_decoder , json_encoder

- Decoder
- takes a log line with a json and converts it to fields on the
Heka message
- write to `message.Fields` for any key that has a string value
- this allows taking advantage of Heka message matchers,
which can match (nested) *Field* values, but can't as easily do
complex processing on the *Payload* string
- decoder supports payload w json substring
- Encoder
- payload must be JSON-string only (no other chars)
- can use PayloadRegexDecoder style formatting to write new fields
e.g. Payload = "My new payload is %fieldname%"
where fieldname is extracted from the json such as
{"fieldname":"hello world"}