https://kotlinlang.org logo
l

Lukasz Kalnik

07/29/2022, 8:57 AM
Update: actually I now discovered the bug in my
@ToJson
implementation: I was using
toJson()
instead of
toJsonValue()
. That's why the serialized JSON was escaped like a plain string. It didn't have anything to do with nesting. But I will switch to a polymorphic adapter factory anyway, because then I won't have to implement from/to JSON functions myself and won't be able to make these kind of errors.
3 Views