maxmello
04/22/2023, 8:56 PMcontext(ObjectMapper?) fun valueToJsonString(obj: Any): String {
return (this@ObjectMapper ?: defaultObjectMapper()).writeValueAsString(obj)
}
Actually, it seems like its not even possible to use nullable receivers this way, IntelliJ does not recognize the this@ObjectMapper
if the context parameter is nullable.Youssef Shoaib [MOD]
04/22/2023, 9:11 PMmaxmello
04/24/2023, 12:43 PM