From ffd221f58c66b759a33e83aaa52181f9b7d87fd0 Mon Sep 17 00:00:00 2001 From: Henry Hu Date: Wed, 3 Feb 2016 11:48:28 +0800 Subject: [PATCH] Add the json as the default parser --- internal/encoding/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/encoding/parser.go b/internal/encoding/parser.go index e6bd53520..815832e94 100644 --- a/internal/encoding/parser.go +++ b/internal/encoding/parser.go @@ -24,7 +24,7 @@ func (p *Parser) Parse(dataFormat string, out []byte, acc telegraf.Accumulator) var metric telegraf.Metric switch dataFormat { - case "json": + case "","json": var jsonOut interface{} err = json.Unmarshal(out, &jsonOut) if err != nil {