While converting from java to kotlin the output is given as follows Java:
Gson gson = new Gson();
String strObj = getIntent().getStringExtra("passdata");
userDictionery = gson.fromJson(strObj, Map.class);
Kotlin:
val gson = Gson()
val strObj = intent.getStringExtra("passdata")
userDictionery = gson.fromJson<Map<*, *>>(strObj, Map<*, *>::class.java) as Map<String, String>?
But second line in kotlin shows an error that - Only Classes are allowed left hand side of the class literal
variable userDictionery is declared as Map<String, String>
How to resolve this issue?