FeedStore/Connection question



Thank you for the excellent book.

In the example for chapter 28, you have a completion block in the BNRConnection class that takes RSSChannel and NSError as parameters. My questions is if I wanted to use a generic "id " object instead of RSSChannel how would I go about implementing it? This would allow me to use the same Connection class and completion block property for various classes that conform to JSONSerializable.

Thank you.


I’m confused. In BNRConnection.m, the property is declared as

@property (nonatomic, strong) id <JSONSerializable> jsonRootObject;

You can use any JSONSerializable object as the root object of the connection.