hallvard
11/06/2018, 9:19 PMstringify(). But it's not very pretty with the companion stuff: JSON serializer = JSON.Companion.getPlain(); ... followed by serializing with a KSerializer, which is also accessed through a Companion object: serializer.stringify(DataObj.Companion.serializer(), dataInst);
So I thought I could hide all of this in my library, in the toString() function of the DataObj. Using this from java would then be a simple question of dataInst.toString()! But alas! The needed code isn't available before the class is compiled, of course. Which is too late for this solution, unfortunately.
Does anyone have some other solution to making the code more elegant for java users?