Jackson Custom Serializer delegating to Jackson to serialize
<p>I have a custom serializer in which I change the value coming in to a different type. I don't know what that type will be and so would like to delegate to jackson to figure out how to serialize it (since jackson has all this functionality already). Is there some way I can do this within MySerializer? In other words, I don't want to have to do a big switch statement on the resulting value's type to determine which method of JsonGenerator to use. (The code is in Kotlin, btw)</p>

<pre><code>class MySerializer() : JsonSerializer&lt;Any?&gt;() {
    override fun serialize(value: Any?, gen: JsonGenerator?, serializers: SerializerProvider?) {
        // Here I transform the value to another type and want to delegate to Jackson to determine how it should be serialized
        val myNewVal = someFunction(value)
// something like super.serialize(myNewVal)???

    }
}
</code></pre>