MySQL JSON field type with string should decode in python3#273
MySQL JSON field type with string should decode in python3#273howmp wants to merge 2 commits intojulien-duponchelle:masterfrom
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 |
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.dumpswill raiseTypeError: keys must be a stringAccording to rfc7159 : https://tools.ietf.org/html/rfc7159#section-8.1
So should decode as
utf-8