<kotlinx deserialization: different types &amp;&am...
# stackoverflow
u
kotlinx deserialization: different types &amp;&amp; scalar &amp;&amp; arrays I'm trying to deserialize a JSON like this (much more complex, but this is the essential part): [ { "field": "field1", "value": [1000, 2000] }, { "field": "field2", "value": 1 }, { "field": "field2", "value":["strval2","strval3"] }, { "field": "field4", "value": "strval1" } ] I've tried to figure out how to use JsonContentPolymorphicSerializer in different variants but it all ends up the same:...