-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
Use Arrows for_json for JSON output #330
Conversation
Arrow provides a `for_json()` function encoding Arrow objects for JSON output. Using the default-parameter of `json.dumps()`, this function is invoked on Arrow objects which can then be encoded for JSON output.
Using Python 3.x, builtins have to be imported, whereas in Python 2.x they are available in the namespace
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.
Thanks @rbialon ! 🙏
Two more things:
- Can you please update the
CHANGELOG
to mention your fix? - Can you add basic tests for the
json_arrow_encoder
?
Sure, I added a short description to the changelog and provided some basic tests. Let me know if the tests should cover more cases, I provided ones for the two that came to my mind. |
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.
Thank you 🎉
Arrow provides a `for_json()` function encoding Arrow objects for JSON output. Using the default-parameter of `json.dumps()`, this function is invoked on Arrow objects which can then be encoded for JSON output. Reference PR: jazzband#330 Fix jazzband#329
PR jazzband#330 forgot to fix the aggregate command (see bug jazzband#329).
PR jazzband#330 forgot to fix the aggregate command (see bug jazzband#329).
PR jazzband#330 forgot to fix the aggregate command (see bug jazzband#329).
PR jazzband#330 forgot to fix the aggregate command (see bug jazzband#329). Reference PR jazzband#331
Arrow provides a
for_json()
function encoding Arrow objects for JSON output.Using the default-parameter of
json.dumps()
, this function is invoked on Arrow objects which can then be encoded for JSON output.This PR fixes #329