Omer Amiel
Gson
ContentNegotiation
val gsonInstance: Gson = ... install(ContentNegotiation) { gson { gsonInstance setPrettyPrinting() setLenient() } }
Aleksei Tirman [JB]
val gsonInstance: Gson = GsonBuilder().apply { setPrettyPrinting() setLenient() }.create() embeddedServer(Netty, port = 4444) { install(ContentNegotiation) { val converter = GsonConverter(gsonInstance) register(ContentType.Application.Json, converter) } }
A modern programming language that makes developers happier.