Is there a way / trick / lib to make kotlinx.seria...
# serialization
v
Is there a way / trick / lib to make kotlinx.serializable able to serialize / deserialize simple PoJo trees? With Jackson you can simply do
ObjectMapper().writerWithDefaultPrettyPrinter().writeValue(it, this)
and
ObjectMapper().readValue(buildSrcResultFile, Result::class.java)!!
. Exists something similar that works with kotlinx.serialization?
t
I'm not sure. I think the @Serializble annotation is needed to make data classes just magicaly work. The annotation is part of the kotlin compile time... I don't think you can add it to java objects.
v
That will for sure not work, especially as I said, those are 3rd-party classes that I cannot modify