https://kotlinlang.org logo
#http4k
Title
# http4k
s

Sean Abbott

10/29/2021, 7:03 PM
I can't figure out how to tell http4k to use a specific deserializer for a particular class. I have https://www.http4k.org/guide/howto/create_a_custom_json_marshaller/ this kinda working, but inside my data class (rather deep inside my data class), I have what is essentially a value class interface and I need to be able to tell my http4k client to use a specific implementation of the interface when deserializing.
r

Razvan

10/30/2021, 10:26 AM
Hi, an exemple or test would make it easier to understand your need, or why the custom exemple does not fits your need.
s

Sean Abbott

11/09/2021, 2:24 PM
Long story short, the object I was trying to parse had an interface rather than reified object in it, which would've required some kind of hints or custom serdes, and I ended up punting on it for now. (I'm also new to kotlin/java serialization, so I'm trying to learn both, and the docs feel like they sorta assume you know the serdes piece, it feels)
Which is fine, just wasn't enough to get me over the line, but that's not your problem. 🙂