Hi I am trying to cast object and it sometime crashes when object has an image url. But it works fine when I am using only string. Help me to understand and resolve the issue.
val sourcedata : LinkedHashMap<String, MutableList<Any>> = somefunction()//this line is ok
var parsedData: LinkedHashMap<String, MutableList<String>> =
Gson().fromJson<LinkedHashMap<String, MutableList<String>>>(Gson().toJson(sourceData))!!
Also my inline function is below
inline fun <reified T> Gson.fromJson(json: String): T? = this.fromJson<T>(json, object :
TypeToken<T>() {}.type)
Issue appears is - Cannot evaluate the expression : Backend (JVM) Internal Error Occurred : Failed to generate expression. KTObjectLiteral expression
from Android app crashes due to complex collection. Cannot evaluate the expression- failed to generate expression KTObject Literal exception
No comments:
Post a Comment