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
Exception in thread "main" kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 20: Encountered an unknown key 'version' at path: $.name
Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys.
JSON input: {"name":"unknown", "version": 2.0}
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
Maybe it is worth making it more explicit and straightforward, for example:
Exception in thread "main" kotlinx.serialization.json.internal.JsonUnknownKeyException: Encountered an unknown key 'version' at path: $.name
Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys.
JSON input: {"name":"unknown", "version": 2.0}
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
Note that the actual exception can still be internal
The text was updated successfully, but these errors were encountered:
Well, it can be put after the main message. The problem with the current one is that it first explains where things went wrong instead of what went wrong
Right now, the failure is the following:
Maybe it is worth making it more explicit and straightforward, for example:
Note that the actual exception can still be internal
The text was updated successfully, but these errors were encountered: