https://kotlinlang.org logo
#ktor
Title
z

zero_coding

08/28/2020, 12:41 PM
One more question, how to return a list of x. For instance,
Copy code
fun Route.genderRoutes() {
    val p = Program()
    get("/genders") { call.respond(p.run()) }
}
the function
p.run()
returns a list of users. Calling the api, I've got:
Copy code
java.lang.StackOverflowError: null
	at com.google.gson.stream.JsonWriter.value(JsonWriter.java:522)