gjson
gjson copied to clipboard
How to disable HTML escaping?
It seems that gjson.AppendJsonString always escapes HTML characters.
https://github.com/tidwall/gjson/blob/c2bc5a409a229e55cd1ba59b6cfd5fe1488d6f0f/gjson.go#L1943-L1945
Can we get an option to disable that for non-HTML scenarios?
There is precedent with other encoders:
-
encoding/jsonhasEncoder.SetEscapeHTML(false) -
Java's gjson has
disableHtmlEscaping()
Thanks.
Version 1.17.3 adds the gjson.DisableEscapeHTML flag will allow for disabling HTML escaping.