回复:
{
"AT": null,
"EMs": [
{
"EC": null,
"LM": null,
"SCs": 0,
"SM": "Username or Password is invalid."
}
],
"OS": 1,
"PWD": "3456",
"UId": 399,
"UN": "bb",
"COM": "Apple",
"DId": 0,
"DN": "iPhone",
"DOS": "iOS",
"EA": "aa@gmail.com",
"FN": "bb",
"IsCon": true,
"IsSuc": false,
"SD": "bb",
"SLT": "XU0QpDVC",
"STs": 0,
"UQId": "1d3346c",
"US": 2,
"Ver": "6.0"
}
在这里,我想获取“用户名或密码无效”之类的 SM 标记值。
我试过这段代码
NSError *error;
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&error];
NSString *SMString = [json objectForKey:@"SM"];
NSString *OSString = [json objectForKey:@"OS"];
NSString *DIdString = [json objectForKey:@"DId"];
NSString *UIdString = [json objectForKey:@"UId"];