-
Notifications
You must be signed in to change notification settings - Fork 684
Fix handling of JSON data #182
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 handling of JSON data #182
Conversation
1afb5e7
to
cafcb60
Compare
This is a very rough implementation that misses a LOT of types but this gives a good starting point. Do not merge it yet. |
https://github.com/percona/percona-server/blob/5.7/sql/json_binary.cc Here is the official "documentation" for mysql json type |
cafcb60
to
7e52344
Compare
@namabile I'd love if you could give this a shot before I merge it. |
7e52344
to
e760cb8
Compare
Awesome. I'll pull this later today and give it a shot. |
Gave this a try and looks really good. I hit an error on json types 4 and 5. Here are the cases I tested:
Let me know if I can provide any info to help debug. |
Well, those are easy to fix though. I intentionally left those one out. I though json was spec'ed as either an object or an array. No other structure. I just re-read the spec. I was wrong. |
e760cb8
to
882a5a2
Compare
self.tearDown() | ||
self.setUp() | ||
|
||
def test_json_basic(self): |
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.
Here is a test for your last usecase @namabile
Introduced in 5.7.8 Fixes julien-duponchelle#181 Signed-off-by: Arthur Gautier <[email protected]>
882a5a2
to
0b011e0
Compare
Hey @noplay, let me know what you think about this one. |
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.
Sound good to me, thanks a lot for taking care of this one
Introduced in 5.7.8
I chose not to handle charset parsing, all dict returned are in binary form. User is expected to parse it.
Fixes #181