RequestParametersFromSerializer
class RequestParametersFromSerializer<T : RequestParameters>(parameterSerializer: KSerializer<T>) : KSerializer<RequestParametersFrom<T>> (source)
In order to de-/serialize generic types we need a kind of factory approach Because we deal with a sealed class we can use an intermediary jsonSerializer, find the correct object and the specific type of the generic type and then finalize the serialization
In order to de-/serialize JwsSigned which itself is again a generic class we use the fact that we can find the class of parameters before we need to know the generic class of JwsSigned. To serialize we use JwsSignedSerializer.