benkuly
11/14/2021, 5:29 PMKSerializer of a List of KSerializers can be used for an object? Maybe with the descriptor?Dominaezzz
11/14/2021, 7:07 PMFudge
11/14/2021, 9:19 PMbenkuly
11/15/2021, 6:20 AMString, KClass-Type and a KSerializer into a set. On serialization my own KSerializer searches for a matching KClass in this set, uses the users KSerializer to serialize the content and puts a type field into the Json from the String in the set.
This works very good, as long as the user does not use generics. With generics, the search of a matching KClass does not include the generic type (->type erasure).
Therefore it would be cool to use something like the descriptor to find a serializer, which can be used to serialize a given (generic) object.Dominaezzz
11/15/2021, 1:07 PMDominaezzz
11/15/2021, 1:08 PMbenkuly
11/15/2021, 1:23 PMDominaezzz
11/15/2021, 1:27 PM