我想知道如何解析 JSON 直到没有其他内容?
这是我的代码,但我需要其他东西来满足我的条件......
for (int i = 0; i != 7; i++)
{
Boxes *boxes = [NSEntityDescription insertNewObjectForEntityForName:@"Boxes" inManagedObjectContext:context];
boxes.name = [[[json valueForKey:@"boxesDetail"] objectAtIndex:i] valueForKey:@"name"] ;
boxes.sexe = [[[json valueForKey:@"boxesDetail"] objectAtIndex:i] valueForKey:@"sexe"] ;
boxes.topic = [[[json valueForKey:@"boxesDetail"] objectAtIndex:i] valueForKey:@"topic"] ;
boxes.number = [NSNumber numberWithInt:[[[[json valueForKey:@"boxesDetail"] objectAtIndex:i] valueForKey:@"number"] intValue]];
}