Franco
07/07/2020, 10:42 PMMap<String, Any>
to a JSON String
using kotlinx.serialization. My use case is that I'm getting some data from a Firestore DB using their JVM SDK, which unfortunately only returns data as a Map. I can try to convert the Map to a custom class and then to a JSON String but that means I have to create a new class only for that intermediate state, which also includes other internal classes I'd need to create and the issue becomes exponentially a pain as I need to get more types of data from the DB. If there is no other way I'll go with this solution but if I can avoid it and save myself some extra code that'd be awesome 🙂