//递归 打印json信息
- (void)printJSON:(id)object
{
if ([object isKindOfClass:[NSArray class]])
{
for (id s in object)
{
if ([s isKindOfClass:[NSDictionary class]] || [s isKindOfClass:[NSArray class]])
{
[self printJSON:s];//递归调用
}
else
{
NSLog(@"解析后数据%@", s);
}
}
}
else if ([object isKindOfClass:[NSDictionary class]])
{
for (id key in object)
{
id obj = [object objectForKey:key];
[self printJSON:obj];//递归调用
}
}
else
{
NSLog(@"%@", object);
}
}