応答:
{
"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"];