Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Collection+JSON wrapper for Objective-C
Objective-C
branch: master
Failed to load latest commit information.
CJCollection.h Apache license
CJCollection.m Apache license
CJItem.h Apache license
CJItem.m Apache license
CJLink.h
CJLink.m Apache license
CJQuery.h Apache license
CJQuery.m Apache license
Collection-JSON-ObjC.podspec Fix podspec
LICENSE.txt Apache license
README.md Add CJQuery. Update readme. Use auto-synthesize

README.md

Collection-JSON-ObjC

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:

  • collection
  • item
  • link
  • query

Requirements

  • ARC
  • XCode 4.4 or later (auto-generation of @synthesize)

Usage

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
        ...
    }

Installation

Simplest is probably git-submodule this project into your app.

Something went wrong with that request. Please try again.