stalla icon indicating copy to clipboard operation
stalla copied to clipboard

Switch XML framework to kotlinx.serialization

Open rock3r opened this issue 3 years ago • 4 comments

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.

rock3r avatar Apr 30 '21 08:04 rock3r

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?

mpgirro avatar May 01 '21 15:05 mpgirro

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

rock3r avatar May 01 '21 22:05 rock3r

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

mpgirro avatar May 02 '21 08:05 mpgirro

Doesn't sound simple ahahahah

rock3r avatar May 02 '21 12:05 rock3r