Skip to content

v1.20.0

@tidwall tidwall tagged this 05 Oct 00:19
People have been reporting problems with global variable causing data races
and downstream import bugs. This commit addresses those issues.

DisableModifiers is no more. It's still available but does nothing. The ability
to disable modifiers is no longer allowed at runtime. If you really want
modifiers to be gone the you can now use a build flag.
    -ldflags="-X 'github.com/tidwall/gjson.disableModifiers=true'"

The AddModifier function is now thread safe.

You can no longer overwrite stock modifers like "@pretty", "@valid", or "@this".

The DisableEscapeHTML global is a noop too. Use SetEscapeHTML() instead.

See #311 #387 #401
Assets 2
Loading