colorjson icon indicating copy to clipboard operation
colorjson copied to clipboard

Add option to disable HTML escaping in strings

Open noise64 opened this issue 2 years ago • 1 comments

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.

noise64 avatar May 05 '22 21:05 noise64