I am using Gson library to serialize/deserialize objects, but when I try to deserialize object like this List<Triple<String, String, DateTime>>
I've got List<Triple<String, String, LinkedTreeMap>>
although IDEA confidently says it's DatTime
and not LinkedTreeMap
.
Asked
Active
Viewed 121 times
0

Praytic
- 1,771
- 4
- 21
- 41
-
Are you using the plug-in Json to data classes? – JavierSegoviaCordoba Dec 06 '18 at 16:43
-
No, I am not using it. – Praytic Dec 06 '18 at 19:44
-
Try it, maybe solve your problem – JavierSegoviaCordoba Dec 06 '18 at 19:52
-
Can you post a link please? – Praytic Dec 06 '18 at 20:11
-
You can find it directly from Android studio plugin settings: https://plugins.jetbrains.com/plugin/9960-json-to-kotlin-class-jsontokotlinclass – JavierSegoviaCordoba Dec 06 '18 at 20:19
-
Actually I don't see how it can help me in this situation. My json which I'm trying to convert to object is correct. – Praytic Dec 06 '18 at 20:51
-
this might help: https://stackoverflow.com/questions/32444863/google-gson-linkedtreemap-class-cast-to-myclass/32494079 – Patric Dec 06 '18 at 22:10