How can I achieve something like ```@Serializable ...
# serialization
e
How can I achieve something like
Copy code
@Serializable
@Contextual
abstract class BaseCreateProfileData {...}
d
Elaborate
e
Oke, it kinda work now, but I don't need discriminator value in json
And looks like it is not possible for now to hide discriminator when doing it in the polymorphic way
d
Exactly
How else is deserialization going to work?
e
I have common code and specific code in app - here is polymorphism is needed
On the server side they do support only one implementation - so they don't need discriminator and they are throwing error in case I send it
d
If server only supports one implementation, then why are you sending the base class?
e
I have white label app. I have a common code that sends JSON to server and I have common code to show edit screen based on the list of typed fields. I have base class entity in common code that produce list of typed properties. So for specific client I have to make specific class from base that overrides function with properties. The rest of code is in common. Unfortunately server is not written by me and it is not strong typed language. People there decided to not write type there but just list of priorities. That is why they don't need a type discriminator.