TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Custom |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
Collection+JSON parser for Objective-C
This set of classes exists to parse the JSON response to a Collection+JSON call into simple objects.
Currently supported:
Create a callback - grabbing a URL:
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(queue, ^{
NSData* data = [NSData dataWithContentsOfURL:url];
dispatch_async(dispatch_get_main_queue(), ^{
[self fetchedData:data];
});
});
In the handler:
- (void)fetchedData:(NSData *)responseData {
CJCollection *collection = [CJCollection collectionForNSData:responseData];
// Now have collection.items and collection.links available etc
...
}
Simplest is probably git-submodule this project into your app.