Skip to content

Add option to disable HTML escaping in strings#6

Open
noise64 wants to merge 1 commit intoTylerBrock:masterfrom
noise64:master
Open

Add option to disable HTML escaping in strings#6
noise64 wants to merge 1 commit intoTylerBrock:masterfrom
noise64:master

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.

@rm-hull
Copy link

rm-hull commented Aug 15, 2024

Could this be merged @TylerBrock ?

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.

2 participants