1. JSONKit (가장 빠르다고 함)

다운 : https://github.com/johnezang/JSONKit

사용방법 참고 : http://www.thezeto.com/wordpress/?p=14

참고 자료 : http://psionides.eu/2010/12/12/cocoa-json-parsing-libraries-part-2/


[usage]

    NSString *jsonUrl = @"http://twitter.com/statuses/public_timeline.json";
    NSData *jsonData = [NSData dataWithContentsOfURL:[NSURL URLWithString:jsonUrl]];
    
    //NSLog(@"jsonData : %@", [jsonData objectFromJSONData]);
    NSArray *items = [jsonData objectFromJSONData];  
    NSLog(@"jsonData >> class : %@, count : %d", [items class], [items count]);
    //NSLog(@"jsonData >> %@", [items objectAtIndex:0]);
    
    // Array에서 Dictionary 가져오기 
    NSDictionary *dic = [items objectAtIndex:0];
    NSLog(@"dic created_at:%@", [[dic valueForKey:@"created_at"] description]);





+ Recent posts