tidwall / gjson

Get JSON values quickly - JSON parser for Go
MIT License
14.1k stars 846 forks source link

Update gjson.go #221

Closed youzeliang closed 3 years ago

youzeliang commented 3 years ago

if !DisableModifiers is always true

tidwall commented 3 years ago

Hi. Thanks for your PR. This specific condition is required in order to disable modifiers on application basis.

For example:

package main

import "github.com/tidwall/gjson"

func main() {
    gjson.DisableModifiers = true

    // now modifiers are disabled for the life of the application.

}
youzeliang commented 3 years ago

ok,I got it wrong

tidwall commented 3 years ago

No worries. I plan on deprecating that flag at some point in future. Just not right now.