if i have a singleton declared with object syntax ...
# getting-started
r
if i have a singleton declared with object syntax
object Foo { ... }
why is it still possible to read an instance of this "class" using jackson objectMapper with
objectMapper.readValue(input, Foo::class.java)
and then I can access fields from that.. Does this not violate the singleton?
e
it does but Jackson doesn't know that
😂 1
there was an attempt to teach
om.fasterxml.jackson.module.kotlin.KotlinModule
but it turns out to break other parts of Jackson, https://github.com/FasterXML/jackson-module-kotlin/issues/281