Я использую этот код для доступа к данным JSON.Он показывает два объекта в массиве, но затем останавливается
SBJsonParser *parser = [[SBJsonParser alloc] init];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://celeritas-solutions.com/emrapp/AppointmentListings.php"]];
NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSString *json_string = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
NSDictionary *object = [parser objectWithString:json_string error:nil];
//appDelegate.books = [[NSMutableArray alloc] initWithCapacity:0];
appDelegate.books = [[NSMutableArray alloc] init];
NSArray *results = [parser objectWithString:json_string error:nil];
NSLog(@"%@", results);
for (int i=0; i<[results count]; i++) {
AppointmentListing *aBook = [[AppointmentListing alloc] initWithDictionary:[results objectAtIndex:i]];
[appDelegate.books addObject:aBook];
[aBook release];
}
Ниже приведены мои данные json
[{"ProviderNPI":"7610922880","PatientID":"556712","AppointmentDate":"2012-03-20","AppointmentTime":"09:00:00","AppointmentListingsID":"1","UpdateDateTime":"2012-03-20 00:30:35"},{"ProviderNPI":"7610922880","PatientID":"712211","AppointmentDate":"2012-03-20","AppointmentTime":"10:00:00","AppointmentListingsID":"2","UpdateDateTime":"2012-03-20 00:31:25"}]