de.lancom.openapi.jackson.KeyDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openapi-parser Show documentation
Show all versions of openapi-parser Show documentation
This open-source project provides an OpenAPI 3.0 Parser implemented in Kotlin, utilizing immutable data classes
package de.lancom.openapi.jackson
import com.fasterxml.jackson.databind.DeserializationContext
abstract class KeyDeserializer(
val factory: (String) -> K,
) : com.fasterxml.jackson.databind.KeyDeserializer() {
override fun deserializeKey(key: String?, ctxt: DeserializationContext?): Any {
return factory(key!!)
}
}