You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am writing an android application and ktor is a server. I have 2 requests - 1 for verification of the code that comes to the email, the second for the login. The response to both requests is the same. In 1 case, deserialization is successful, in the second case it crashes with an error, as if all fields were skipped (on the left you can see the model that is in android studio, on the right in intellij idea)
Error io.ktor.serialization.JsonConvertException: Illegal input: Fields [id, token, username, email, rating, language, country, city, books, photoUrl] are required for type with serial name 'model.User', but they were missing at path: $
Environment
Kotlin version: [2.1.10]
Kotlin platforms: [JVM]
Gradle version: [8.6.1]
Librart version: [1.8.1]
The text was updated successfully, but these errors were encountered:
I cannot verify the issue without knowing what the input was. Are you sure it is not empty?
Remember that you can read Ktor's response only once. If you need to deserialize it twice, first store it in the string.
Describe the bug
I am writing an android application and ktor is a server. I have 2 requests - 1 for verification of the code that comes to the email, the second for the login. The response to both requests is the same. In 1 case, deserialization is successful, in the second case it crashes with an error, as if all fields were skipped (on the left you can see the model that is in android studio, on the right in intellij idea)
Error
io.ktor.serialization.JsonConvertException: Illegal input: Fields [id, token, username, email, rating, language, country, city, books, photoUrl] are required for type with serial name 'model.User', but they were missing at path: $
Environment
The text was updated successfully, but these errors were encountered: