Add more descriptive docs for json/json_lines codecs

This commit is contained in:
Nick Ethier 2013-10-18 13:22:09 -06:00
parent 9b1061d943
commit 3628e24ded
2 changed files with 7 additions and 2 deletions

View file

@ -2,7 +2,10 @@ require "logstash/codecs/base"
require "logstash/codecs/line"
require "json"
# This codec will encode and decode JSON.
# The codec should be used to decode full json messages.
# If you are streaming JSON messages delimited by '\n' then
# see the json_lines codec.
# Encoding will result in a single json string.
class LogStash::Codecs::JSON < LogStash::Codecs::Base
config_name "json"

View file

@ -2,7 +2,9 @@ require "logstash/codecs/base"
require "logstash/codecs/line"
require "json"
# This codec will encode and decode JSON.
# This codec will decode streamed JSON that is newline delimited.
# For decoding JSON payload in the redis input for example, use the json codec instead.
# Encoding will emit a single JSON string ending in a '\n'
class LogStash::Codecs::JSONLines < LogStash::Codecs::Base
config_name "json_lines"