Created
April 22, 2022 08:55
-
-
Save 0OZ/59332d8cb05cf4d52cfca9ecf4ce789c to your computer and use it in GitHub Desktop.
Deserialization.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline fun <reified T> deserialization(json: String): T = | |
jacksonObjectMapper().registerKotlinModule().readValue(json) as T | |
// --- | |
fun foo(){ | |
val boo = deserialization(message) as Boo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment