ec
01/21/2020, 8:02 PMClazz<T> like things with reified it was too easy. Is there anything problematic about this?
class Serde {
var mapper = jacksonObjectMapper()
fun <R>serialize(instance: R): ByteArray {
return mapper.writeValueAsBytes(instance)
}
inline fun <reified R>deserialize(arr: ByteArray): R {
return mapper.readValue<R>(arr)
}
}