Michael Sigl
02/11/2021, 7:03 AMDeactivated User
02/11/2021, 8:09 AMval file = yourVfsFile
if (!file.exists()) file.writeString("")
return file.readString()
Korio does't provide automatic serialization for any type, but only json for primitive types like maps, lists, numbers, bools and strings. For converting any object into an XML you can use jackson if you are using JVM only, or kotlinx-serialization for multiplatform projects. Those are separate libraries to korlibs, but you can find help in other channels or the internet about how to use them.
For the korio part: you should end reading and writing plain strings from/to files and do the de/serialization part with those strings