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

Tony Blundell

09/03/2019, 3:07 PM
Hi, how do I tell Ktor client to ignore unknown fields when deserializing to an instace of a dataclass with JacksonSerializer?
d

Dominaezzz

09/03/2019, 3:20 PM
That's something to tell
JacksonSerializer
itself.
t

Tony Blundell

09/03/2019, 3:20 PM
Found it 🙂
Copy code
@JsonIgnoreProperties(ignoreUnknown = true)
data class MyDataClass(val myInt: Int)
c

coder82

09/03/2019, 4:17 PM
👍
140 Views