Kotlin / dataframe

Structured data processing in Kotlin
https://kotlin.github.io/dataframe/overview.html
Apache License 2.0
821 stars 58 forks source link

Make Kotlin Serialization optional/repaceable #893

Open hantsy opened 6 days ago

hantsy commented 6 days ago

Upgrade to v0.14, I found kotlinx-serialization-core/json becomes a dependency of dataframe-core.

If it is for processing JSON files, it should be part of the dependencies of the dataframe json module. In our backend, we use Kotlin/Spring Boot, but we do not use Kotlin Serialization as JSON serialization/deserialization.

Or it should be replaceable with the existing popular solution, not just Kotlin serialization, should be replaced with Jackson, Jakarta JSONB, Gson, etc.

When upgrading to v0.14, it will conflict with the existing Jackson config in Spring.

zaleslaw commented 3 days ago

Thanks for reporting, we will discuss this issue inside the team and share the solution

Jolanrensen commented 3 days ago

Could you explain what breaks for your project when our library has kotlinx.serialization as implementation dependency? Is it a complaint about the size of the dataframe-core dependency or do you face a clash somewhere else in your library?

Currently, our JSON support is not yet in a separate module, but we do have plans to change the infrastructure eventually.

hantsy commented 2 days ago

There is a Jackson/Kotlinx coexisting issue in Spring Boot, but Spring Boot does not provide an autoconfig for Kotlinx Serialization, when adding Kotlinx serialization JSON in dependencies, some of our endpoint exposed enum array will pick up Kotlinx as serial/deserial tools.

see: https://github.com/spring-projects/spring-boot/issues/24238#issuecomment-2380387068

hantsy commented 2 days ago

Currently, our JSON support is not yet in a separate module, but we do have plans to change the https://github.com/Kotlin/dataframe/issues/100.

It is great.

Jolanrensen commented 2 days ago

There is a Jackson/Kotlinx coexisting issue in Spring Boot, but Spring Boot does not provide an autoconfig for Kotlinx Serialization, when adding Kotlinx serialization JSON in dependencies, some of our endpoint exposed enum array will pick up Kotlinx as serial/deserial tools.

see: spring-projects/spring-boot#24238 (comment)

thanks for the explanation!