-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: Add JSON encoding for polars list type: pl.Expr.list.json_encode()
#18353
Conversation
pl.Expr.list.json_encode()
pl.Expr.list.json_encode()
pl.Expr.list.json_encode()
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #18353 +/- ##
=======================================
Coverage 79.84% 79.85%
=======================================
Files 1496 1496
Lines 200333 200357 +24
Branches 2841 2841
=======================================
+ Hits 159952 159986 +34
+ Misses 39856 39846 -10
Partials 525 525 ☔ View full report in Codecov by Sentry. |
Instead of adding this to the |
I would agree withing making everything |
#14029
#8482
Involve most of the relevant discussion. It seems as though
src/json/write/serialize.rs
had all the relevant code, all that needed to be done was wrap these calls as thepl.Struct
/struct_
does.Is there any reason why all (or nearly all) polars types shouldn't have a
.json_encode
method? This might be preferred and reduce code duplication if it is desired to add ajson_encode
to more types thanpl.Struct
andpl.List
.A few lingering questions:
json_encode
to all (or nearly all) polars typesignore_nulls
flag be present (instead of the current mapping to the string"null"
, similar to what feat: Addignore_nulls
option tostruct.json_encode
#17867 is working on?