Deserialize JsonArray with kotlinx serialization
I have the following Json object:
{
"List":[
"string1",
"string2",
"string3",
"..."
]
}
This deserializes into a JsonArray containing JsonLiterals.
When deserializing this and trying to iterate over it I get an error:
java.lang.ClassCastException: kotlinx.serialization.json.JsonLiteral cannot be cast to java.lang.String
What would be the standard way to achieve something like that?