I have a series of NSObject's I would like to serialize to JSON and post to a service. The final object consists of several levels of these NSObject subclasses nested within each other.
Each one of these objects follows a protocol with a method which returns that objects properties in an NSDictionary with the appropriate keys. However, some of these properties are other objects and so forth, making the serialization a bit complicated.
Is there a pattern I could use to simplify serializing the final object? Using JSONKit, it seems I would need to serialize each dictionary individually from the deepest object and work backwards, checking for errors, then adding to a compound string. I know this can not possibly be the best method using this very capable library. Any suggestion or guidance is welcomed.
Edit 1