Skip to content

Json module extraction #1147

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

Merged
merged 15 commits into from
Apr 29, 2025
Merged

Json module extraction #1147

merged 15 commits into from
Apr 29, 2025

Conversation

Jolanrensen
Copy link
Collaborator

@Jolanrensen Jolanrensen commented Apr 23, 2025

Fixes #100

  • Extracts JSON reading/writing to dataframe-json
  • Internal calls to :core are done via a friend module setup, like with dataframe-jupyter. Hopefully this can be simplified when the IDE gets full friend-module support
  • The dataframe package includes dataframe-json by default, as expected
  • dataframe-csv, and dataframe-excel allow writing DataFrame/DataRow as json. I rewrote this via a reflection call for now, prompting the user to add the dataframe-json package if they need this functionality. This is a bit hacky and might need a better solution. I was thinking of adding a toStr function in the SupportedDataFrameFormat service. That way they can check supportedFormats for a SupportedDataFrameFormat that accepts the json extension and call that generic one.
  • dataframe-csv, and dataframe-excel depend on dataframe-json by default, but this dependency can be manually and safely excluded when working only with flat data.
  • reading (nested) json is done via parsing. This might need a similar solution. Either by using SupportedDataFrameFormat for parsing String -> AnyRow/AnyFrame or by allowing the parser to become pluggable itself (Allow custom Parsers #962). Solved with reflection for now

@Jolanrensen Jolanrensen marked this pull request as ready for review April 26, 2025 11:03
@Jolanrensen Jolanrensen added this to the 1.0.0-Beta1 (0.16) milestone Apr 26, 2025
@Jolanrensen Jolanrensen added the infrastructure GitHub actions, Gradle Scripts, Writerside, etc. label Apr 26, 2025
@Jolanrensen
Copy link
Collaborator Author

@koperagen @zaleslaw @AndrewKis As discovered by @ileasile we'd better migrate all jupyter dependencies to gradle.build.kts instead of the jupyter integration. We can see that readJsonStr now breaks for notebooks.

@Jolanrensen
Copy link
Collaborator Author

@ileasile Thanks ❤️

@Jolanrensen Jolanrensen merged commit 00b712b into master Apr 29, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure GitHub actions, Gradle Scripts, Writerside, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split codebase into several subprojects
3 participants