Use the output and inject_message functions. i.e.
output(my_table)
inject_message()
-- you can optionally add a type/title for easier downstream
filtering/consumption especially if the decoder can output multiple json
schemas.
-- inject_message("json", "my_schema1")
Trink
----- Original Message -----
> From: "briche arnaud" <[email protected]>
> To: [email protected]
> Sent: Friday, December 20, 2013 5:53:20 AM
> Subject: [heka] Json encoding from Lua script
> Hi,
> I'm writing decoder in Lua and I set the payload as Json in order for it to
> be indexed in Elasticsearch later; but it seems that the cjson module you
> provide only allow to decode. What can I do to be able to encode to json
> from a Lua script ?
> --
> -- Arnaud Briche
> Développeur web / Préstataire de service informatique
> _______________________________________________
> Heka mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/heka
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka