-
Notifications
You must be signed in to change notification settings - Fork 679
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
MySQL JSON field type with string should decode in python3 #273
base: master
Are you sure you want to change the base?
Conversation
Please restart build, seems network error. https://travis-ci.org/noplay/python-mysql-replication/jobs/402200041 |
I'm not the owner of the project so can't restart directly. have to open/close :/ sorry |
Failed when install |
We've been converting charset all over the place. I dislike that a lot (it's not our job as a lib). Forcing encoding to We should find a better way for user to provide a encoding (even if we default to utf-8). Consider a column with two json fields, one |
In the documentation: https://dev.mysql.com/doc/refman/5.7/en/json.html
Json field can't be utf16 |
It would be good to remove support for Python 3.3 since nobody should be using it anymore (I guess). Makes sense? |
Yeah. I agree |
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.
Why not move forward with this?
Fix #272
Table:
CREATE TABLE test (id int, value json);
With data:
But event's values in python3 is :
{"id":1,"value":{b"string1":b"string2"}
And when use
json.dumps
will raiseTypeError: keys must be a string
According to rfc7159 : https://tools.ietf.org/html/rfc7159#section-8.1
So should decode as
utf-8