colorjson
colorjson copied to clipboard
Add option to disable HTML escaping in strings
Pretty printing strings with HTML unsafe characters (e.g <
) can be quite "unpretty" with the default HTML escaping. This PR adds option to control this.
The RawStrings
option can achieve similar effect, but with this option the output is both pretty and still valid JSON.
I kept the original code path using json.Marshal
as before, so the performance with default options should not be affected except for the bool check.