Hello everybody!
So I have this interesting use case that I cannot seem to be able to handle. I have a module with two interfaces,
Base
(which is sealed) and
Data
that extends it, and subclasses of
Data
that cannot be changed, and I have other modules where I can do anything. The comments in the code below should hopefully guide you.
Data
interface should be serialized taking into account only its text property (I use
ConcreteData
for deserializing). The issue is that while I can serialize arbitrary subclasses (represented by
RandomData
) in the context of
Data
, I cannot seem to do it in the context of
Base
.
Any help would be greatly appreciated!