Skip to content

Commit

Permalink
Keep boolean when listed in json_string_fields (influxdata#6400)
Browse files Browse the repository at this point in the history
  • Loading branch information
glinton authored and danielnelson committed Sep 16, 2019
1 parent d1de4a2 commit 591ecca
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions plugins/parsers/json/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,11 @@ func (p *Parser) switchFieldToTag(tags map[string]string, fields map[string]inte
//remove any additional string/bool values from fields
for fk := range fields {
switch fields[fk].(type) {
case string:
case string, bool:
if p.stringFields != nil && p.stringFields.Match(fk) {
continue
}
delete(fields, fk)
case bool:
delete(fields, fk)
}
}
return tags, fields
Expand Down

0 comments on commit 591ecca

Please sign in to comment.