如何解析这种文件:
{"group":"1"}{"group":"2"}{"group":"3"}
通常我是这样解析的:
NSString *fileContent = [[NSString alloc] initWithContentsOfFile:reloadPath];
SBJsonParser *parser = [[SBJsonParser alloc] init];
NSDictionary *data = (NSDictionary *) [parser objectWithString:fileContent error:nil];
// getting the data from inside of "menu"
//NSString *message = (NSString *) [data objectForKey:@"message"];
//NSString *name = (NSString *) [data objectForKey:@"name"];
NSArray *messagearray = [data objectForKey:@"message"];
NSArray *namearray = [data objectForKey:@"name"];
NSDictionary* Dictionary = [NSDictionary dictionaryWithObjects:messagearray forKeys:namearray];
……本王的物品……
{"message":["Besth"],"name":["thgh"]}
...但是在我要解析的类型中,哪个是键和对象?
顺便说一句,我想检索这样的列表:1、2、3,...