Get multiple object instances at runtime via reflection

Not sure whether it’s been discussed (didn’t find related threads in this forum). My use case is that I define some nested data structure (using data class) and some of them is declared as object. Then I use jackson to serialize/deserialize it for persistence. When I deserialize an instance of this data type, I realize those object declarations are not really singletons and their heap id is different. I could workaround this by making those object as data class but maybe it’s worthing mentioning this behavior in the document to avoid any misunderstanding. By the way, I find a similar discussion on the web: Not so Singletons in Kotlin. Putting Kotlin’s Object Declaration to… | by Rahul Chowdhury | AndroidPub | Medium