Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable HTML escaping in strings #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

noise64
Copy link

@noise64 noise64 commented May 5, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant