I have another issue (hopefully last one). I load a list of quotes from an api. Everything worked fine before migration.
override suspend fun getInspiringQuotes(): Resource<List<InspiringQuoteRemote>> {
return try {
val quotes = client.get {
url(WordpressRoutes.InspiringQuotes)
}.body<List<InspiringQuoteRemote>>()
Resource.Success(quotes)
} catch (e: Exception) {
Timber.e(e)
Resource.Error(e.localizedMessage)
}
}
This is the json-response I receive. I validated the response with an online tool that said it's a VALID (RFC 8259)
[
{
"quote_author":"Oskar Wilde",
"quote":"Unzufriedenheit ist der erste Schritt zum Erfolg."
},
{
"quote_author":"Winston Churchill",
"quote":"Erfolg haben heißt, einmal mehr aufstehen, als man hingefallen ist."
},
{
"quote_author":"Henry Ford",
"quote":"Erfolg besteht darin, dass man genau die Fähigkeiten hat, die im Moment gefragt sind."
},
{
"quote_author":"Albert Einstein",
"quote":"Der sicherste Ort für ein Schiff ist der Hafen. Doch dafür sind Schiffe nicht gemacht."
}
]
Still I get the following error.
kotlinx.serialization.json.internal.JsonDecodingException: Expected start of the array '[', but had 'EOF' instead
Any idea?