Thread
#serialization
    Eugen Martynov

    Eugen Martynov

    8 months ago
    How can I achieve something like
    @Serializable
    @Contextual
    abstract class BaseCreateProfileData {...}
    Dominaezzz

    Dominaezzz

    8 months ago
    Elaborate
    Eugen Martynov

    Eugen Martynov

    8 months ago
    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
    Dominaezzz

    Dominaezzz

    8 months ago
    Exactly
    How else is deserialization going to work?
    Eugen Martynov

    Eugen Martynov

    8 months ago
    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
    Dominaezzz

    Dominaezzz

    8 months ago
    If server only supports one implementation, then why are you sending the base class?
    Eugen Martynov

    Eugen Martynov

    8 months ago
    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.