-
Notifications
You must be signed in to change notification settings - Fork 259
use Jsonitor instead of encoding/json #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
parser/csv_parser.go
Outdated
@@ -37,6 +37,11 @@ const ( | |||
|
|||
const MaxParserSchemaErrOutput = 5 | |||
|
|||
var jsontool = jsoniter.Config{ | |||
EscapeHTML: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个字段是指忽略 html ? 会不会影响用户的数据?
} | ||
|
||
func NewJsonParser(c conf.MapConf) (LogParser, error) { | ||
name, _ := c.GetStringOr(KeyParserName, "") | ||
labelList, _ := c.GetStringListOr(KeyLabels, []string{}) | ||
nameMap := map[string]struct{}{} | ||
labels := GetLabels(labelList, nameMap) | ||
jsontool := jsoniter.Config{ | ||
EscapeHTML: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EscapeHTML是json标准库默认的行为
发现了一个jsoniter不适配的地方:json-iterator/go#217 |
LGTM |
Fixes [issue number]
Changes
主要集中在2个优势
Reviewers
Wiki Changes
Checklist