mpgirro / stalla

A Kotlin and Java library for RSS podcast feeds
https://stalla.dev
BSD 3-Clause "New" or "Revised" License
26 stars 5 forks source link

Switch XML framework to kotlinx.serialization #91

Open rock3r opened 3 years ago

rock3r commented 3 years ago

I found out recently that there is an XML implementation for kotlinx.serialization: https://github.com/pdvrieze/xmlutil It's not first party, unlike JSON, but if we add kotlinx.serialization already for #70 it makes a lot of sense to switch.

xmlutil currently supports Android, JVM and JS; it would be good to switch to that, if it works for us. Getting Android support sounds very useful. This issue is a placeholder to experiment with kotlinx.serialization and seeing how it works. Switching to a Multiplatform project means we'll need to change our publication strategy (have a core, and separate jvm and android artifacts that depend on that, as a minimum) so it's reserved for a major version — could be a v2.0 headline feature.

The actual conversion to MP is taken care of as part of #63 — the goal of this issue is merely to switch our current jvm-only implementation. It could even be shipped in a 1.x release since it's not exposed to users.

mpgirro commented 3 years ago

I'm quite curious how much effort the migration to kotlinx.serialization will turn out to be in the end. I've just played around a little when you brought up the idea first, but it's not as straight forward as JAXP unfortunately 😅.

Do you have some experience with it?

rock3r commented 3 years ago

I do, but not with xml. It's easy to deal with json, but... Have to see how it works out this time around. I suppose it mostly depends on xmlutil

mpgirro commented 3 years ago

Ok, I experimented by trying to write a WebVTT impl. Maybe that wasn't the smartest starter project 😆

rock3r commented 3 years ago

Doesn't sound simple ahahahah