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

TwoClocks

09/17/2020, 2:18 AM
yeah. encoding a list of more than one
BaseClass()
includes the type info. But encoding just one (or a list of one) of the subtypes will not generate the
"type":
field in the result. How do you force the type info to be present?
figured it out. You have to cast it to the base class when calling encode
6 Views