Skip to content

Reply for getSubscriptionsList interpreted as a feed #7

Open
@ghost

Description

Hello,

if you try using getSubscriptionsList method you discover it doesn't work. Google sends back the subscription list as a JSON object, but the code tries to interpret it as an RSS feed. A quick fix to connectionDidFinishLoading method did the job, most of the code was already there. Here it is:

- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
    NSLog(@"------------------------------- connectionDidFinishLoading: %d", [responseData length]);

    // check if data is JSON parsable
    NSString *JSONString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
    NSError *jsonerr = nil;
    NSDictionary *JSONdict = [JSON objectWithString:JSONString error:&jsonerr];

    if (!jsonerr) {
        [delegate GoogleReaderRequestDidLoadJSON:JSONdict];
        return;
    }

    MWFeedParser *parser = [[MWFeedParser alloc] initWithData:responseData];
    parser.delegate = self;
    [parser parse];

    //NSLog(@"responseData: %@", JSONString);
    self.responseData = nil;
    //response = nil;
    //error = nil;
    //expectedResponseLength = nil;
    self.web = nil;
}

Best regards,

Gianluca

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions