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

Handle non-UTF8 control characters in JSON response #2831

Closed

Conversation

srfrog
Copy link
Contributor

@srfrog srfrog commented Dec 19, 2018

This PR adds a new JSON marshaler for handling responses that might include control sequences not allowed in JSON strings that break the Go JSON encoder.

It double escapes escaped hexadecimal values by replacing \x with \\x. This allows those values to be encoded into JSON strings.

Closes #2662


This change is Reviewable

@srfrog srfrog closed this Dec 20, 2018
@srfrog srfrog deleted the srfrog/issue-2662_unable_to_marshal_response_error branch December 20, 2018 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant