simple inheritance #112
-
Is there any way to do this?
How do I annotate this so that when Container is decoded the correct instances of A/B are instantiated? I got dynamic coding with a protocol working but I'd rather not use that. It seems it only works with protocols and enums? I could code it by hand to work, but it seems the purpose of MetaCodable is to make something like this easy. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@robaho I am assuming you are talking about
Please use discussion to ask these kind of queries. And use the proper templates when creating issues. |
Beta Was this translation helpful? Give feedback.
@robaho I am assuming you are talking about
MetaProtocolCodable
, you can use enums without having to use theMetaProtocolCodable
.MetaCodable
by itself provides untagged, external, internal and adjacent tagging enum decoding functionality. For your use case, it could look something like:Please use discussion to ask these kind of queries. And use the proper templates when creating issues.