Critique for JSON IO technique for saving/restoring a subclassed object

Is there any interest here in critiquing my Swift 4 technique for reading and writing JSON objects that are subclasses of a superclass?


Basically, the current encode/decode approach requires that the programmer know what the object type is at the time they write the code. But for my application, I wanted to manage everything using protocols, so encoding the object would need to write its class name first, then all of its properties. Upon reading, the name would need to be read first, looked up in the application bundle, and then decoded with the actual object type.


I did this by creating a generic

JSONio<T>
class, where T represents the base class in a hierarchy of classes and must implement the CodableDelegate protocol that I created. Now the JSONio object can be read or written and all of the IO is encapsulated and hidden.


I'm not sure this is the right forum for such a discussion, but I don't run a blog site so this seems as good a place as any — who would benefit more than Swift developers on iOS? I can create a GitHub gist and upload the code along with some descriptive text, if anyone's interested, but I don't want to waste time on it, if not.