Related packages
dogs_core
Feature
When I have a sealed class, I have to remember to tag each usage in @serializable classes with @polymorphic. I frequently forget, and end up discovering the error at runtime when serialization breaks.
Ideally, it becomes possible to tag the class' definition with @polymorphic, or just make the class @serializable with the same intent. (I believe right now it's an error, since abstract classes cannot be instantiated.)
This also reduces lines of code across all my models since all those @polymorphic annotations are usually the only annotation on those fields.
If this is already possible, please let me know. I looked through the documentation site but didn't find a way to do it.
Related packages
dogs_coreFeature
When I have a sealed class, I have to remember to tag each usage in
@serializableclasses with@polymorphic. I frequently forget, and end up discovering the error at runtime when serialization breaks.Ideally, it becomes possible to tag the class' definition with
@polymorphic, or just make the class@serializablewith the same intent. (I believe right now it's an error, since abstract classes cannot be instantiated.)This also reduces lines of code across all my models since all those
@polymorphicannotations are usually the only annotation on those fields.If this is already possible, please let me know. I looked through the documentation site but didn't find a way to do it.