1 使用服务器端作为中介,通过>可以强制转换
NSDictionary responseDict = (NSDictionary )responseObject;
NSDictionary dataDict = [responseDict valueForKey:@"Data"];
NSDictionary userInfoDict = [dataDict valueForKey:@"UserInfo"];
NSString MemberId = [userInfoDict valueForKey:@"MemberID"];
NSString MemberName = [userInfoDict valueForKey:@"MemberName"];
[[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@""];
[[NSUserDefaults standardUserDefaults] synchronize];
看起来略繁琐,推荐可以用第三方来解析这些返回数据,比如JsonKit
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)