My current project employs Kotlin serialisation to consume a family of remote RESTFul API's.
The API responses are Json and I cannot amend them.
One of the API's returns a "Person" as either a String or an Array of Strings.
How cam I get Kotlin serialisation to automatically consume either value?
Im using this version of Kotlin serialisation
api 'org.jetbrains.kotlinx:kotlinx-serialization-core:1.3.0'
api 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0'