-
Notifications
You must be signed in to change notification settings - Fork 27
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
fix: encode serialized JSON string as UTF-8 #121
Conversation
Codecov Report
@@ Coverage Diff @@
## main #121 +/- ##
==========================================
+ Coverage 99.01% 99.50% +0.48%
==========================================
Files 22 22
Lines 816 815 -1
==========================================
+ Hits 808 811 +3
+ Misses 8 4 -4
Continue to review full report at Codecov.
|
if sys.version_info >= (3, 0) and isinstance(data, str): | ||
if isinstance(data, str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't support Python 2 as far as I know, so I removed this version check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍
## [3.11.1](v3.11.0...v3.11.1) (2021-08-18) ### Bug Fixes * encode serialized JSON string as UTF-8 ([#121](#121)) ([6c1ddac](6c1ddac))
🎉 This PR is included in version 3.11.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This PR adds encoding to the serialized JSON payload. We are already doing this if the payload is passed as a string.
In the generated SDKs, for example in the Platform Services/Case Management, we serialize the
data
dictionary and pass it to theprepare_request
function as a string, therefore I think it's safe to add encoding here.