Simple JSON Fetcher
Objective-C Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
JSONKit @ 02b983f
example
src
.gitignore
.gitmodules
README

README

JSONRequest

JSONReqest提供一个简单的获取JSON对象的方法。


例子


    @interface MyObject : NSObject <JSONRequestDelegate>
    @end

    @implementation MyObject
    - (void)getObjectFromURL:(NSURL *)URL
    {
            JSONRequest *request = [JSONRequest requestWithURL:URL];
            request.delegate = self;
            [request setValue:@"20" forParamKey:@"count"];
            [request send];
    }

    - (void)requestFinished:(JSONRequest *)request
    {
            id rootObject = request.response.rootObject;
            // ...
    }

    - (void)requestFailed:(JSONRequest *)request
    {
           // ...                                
    }
    @end