-
Notifications
You must be signed in to change notification settings - Fork 58
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
Support for the serialization of DataframeConvertible values in ValueColumns has been added to enhance visualization in the KTNB plugin. #823
Conversation
Implemented the `CellKind` enum with a `DataFrameConvertable` type. Updated JSON writing logic to handle `DataFrameConvertable` cells and added utility function to check if an object is convertible to DataFrame.
Also refactor JSON encoding to use the unified EncodingOptions interface
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.
Just some small notes, but LGTM
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/columns/CellKind.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/json.kt
Outdated
Show resolved
Hide resolved
core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/io/ImageSerializationTests.kt
Outdated
Show resolved
Hide resolved
Replace `EncodingOptions` with `CustomEncoder` to improve flexibility and clarity in the JSON serialization process. This update includes introducing `CustomEncoder` interface and dedicated encoders for DataFrameConvertable and BufferedImage, alongside necessary adjustments across related classes and tests.
I’ve pushed a refactoring that replaces EncodingOption with a CustomEncoder interface. You might want to take a look, @Jolanrensen @koperagen. |
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.
Great job! I really like this modular approach :)
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/io/writeJson.kt
Outdated
Show resolved
Hide resolved
Generated sources will be updated after merging this PR. |
debf9bb
to
c8426ba
Compare
If the value within the ValueColumn can be converted to a dataframe, it will be serialized in a manner similar to the FrameColumn values. Consequently, it will be visualized as a nested table in the KTNB plugin.