kushalp
03/25/2020, 8:53 PMdata class Sample(val foo: Number)
and the following example map that I may not know until runtime mapOf("foo" to 1, "bar" to 2, "baz" to 3)
. How can I extract just the value that's relevant to the Sample
data class and build it when I don't know if the field in question will be present?df
03/25/2020, 9:05 PMObjectMapper().convertValue<Sample>(map)
Casey Brooks
03/25/2020, 9:09 PMdf
03/25/2020, 9:09 PMkushalp
03/25/2020, 9:30 PM