https://kotlinlang.org logo
#serialization
Title
# serialization
h

hastebrot

06/07/2018, 2:57 PM
so, will the JSON ast parser stuff enable us to use polymorphic json objects with
@type
entry? https://github.com/Kotlin/kotlinx.serialization/pull/132
s

sandwwraith

06/07/2018, 3:02 PM
In theory yes, but it’s not automated. You’ll need to manually write deserializer for that, which will first deserializer to json-ast, look into
@type
and then use corresponding to type deserializer
b

bissell

06/07/2018, 4:26 PM
How do we deserialize a given object or field to a general JSON AST from a manually written deserializer? I was never able to figure out which read method could do that.
b

bissell

06/07/2018, 5:06 PM
💥 just what I needed, thanks!
3 Views