APXEOLOG
class SomeClass { fun getListOfSelf(): List<SomeClass> { return listOf(this) } } /** * com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) * (through reference chain: java.util.Collections$SingletonList[0] * ->core.PlaneTest$SomeClass["listOfSelf"] * ->java.util.Collections$SingletonList[0] * ->core.PlaneTest$SomeClass["listOfSelf"] * ... */ @Test fun testJackson() { val mapped = jacksonObjectMapper() val data = SomeClass() val result = mapped.writeValueAsString(data) }
fun getListOfSelf
A modern programming language that makes developers happier.