Skip to content

Commit

Permalink
No longer interfers with elasticsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
maxunt committed Jun 13, 2018
1 parent 733d325 commit c9269b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/parsers/json/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (p *JSONParser) parseObject(metrics []telegraf.Metric, jsonOut map[string]i
}

f := JSONFlattener{}
err := f.FlattenJSON("", jsonOut)
err := f.FullFlattenJSON("", jsonOut, true, true)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -156,7 +156,7 @@ func (f *JSONFlattener) FlattenJSON(

//bool values to be changed to allow strings, bools as fields
//changed to true true, func switchFieldToTag will remove values
return f.FullFlattenJSON(fieldname, v, true, true)
return f.FullFlattenJSON(fieldname, v, false, false)
}

// FullFlattenJSON flattens nested maps/interfaces into a fields map (including bools and string)
Expand Down

0 comments on commit c9269b8

Please sign in to comment.