Add the json as the default parser

This commit is contained in:
Henry Hu
2016-02-03 11:48:28 +08:00
parent 3a54ef33f1
commit ffd221f58c

View File

@@ -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 {