Tianyu Zhu
07/20/2023, 6:57 PMmapOf() ) using kotlinx serialization?
Class 'EmptyMap' is not registered for polymorphic serialization in the scope of 'Map'.
To be registered automatically, class 'EmptyMap' has to be '@Serializable', and the base class 'Map' has to be sealed and '@Serializable'.asdf asdf
07/20/2023, 9:11 PMMapSerializer, so it would be strange to serialize them polymorphicallyTianyu Zhu
07/20/2023, 9:13 PMJson.encodeToString(mapOf())
2. It doesn't work when I try to serialize it with ktor client...
3. After some debugging, it seems like ktor is not finding the LinkedHashMapSerializer. It's instead trying to find a PolymorphicSerializer...Tianyu Zhu
07/20/2023, 9:14 PMglureau
07/21/2023, 12:00 PMJson.encodeToString<Map<Xxx>>(myMap)glureau
07/21/2023, 12:01 PM