Zakhar
08/10/2023, 12:10 PM"type" filed.
I did the same thing and for me the module deletes the "type" field.Adam S
08/10/2023, 12:17 PMval data to be Project, which is polymorphic.
val data: Project = OwnedProject("kotlinx.coroutines", "kotlin")
while in your code val data has an inferred type of OwnedProject, which is not polymorphic and does not require a type field
val data = OwnedProject("kotlinx.coroutines", "kotlin")Zakhar
08/10/2023, 12:25 PMval data = OwnedProject("kotlinx.coroutines", "kotlin")
println(format.encodeToString<Project>(data))Jacob Ras
03/01/2025, 3:03 PM