Normally, you can't pass a generic type to a function and access it as if it were a class. This is because of type erasure: generic types are erased at compile time and aren't normally accessible at runtime.
fun <T> deserializeObject(json: String): T {
val mapper = jacksonObjectMapper()