我想计算从JSONObjectWithData
获得的JSON项目。
id jsonObjects = [NSJSONSerialization JSONObjectWithData:receivedData options:NSJSONReadingMutableContainers error:nil];
NSLog(@"%@",jsonObjects);
JSON返回
{
detail = "\U0e19\U0e31\U0e01\U0e28\U0e36\U0e01\U0e29\U0e32";
email = "krol3ong8gs@gmail.com";
id = 1;
name = "\U0e13\U0e23\U0e07\U0e04\U0e4c\U0e0a\U0e31\U0e22 \U0e08\U0e34\U0e19\U0e14\U0e32\U0e1b\U0e23\U0e30\U0e01\U0e32\U0e22";
password = 9670f4c03767a65db8067d2b5cf2e6e4;
picture = "Thumbnails_2012-10-14_23-56-59.jpg";
username = asskyo001;
}
答案 0 :(得分:2)
使用此
NSDictionary *jsonObjects = [NSJSONSerialization JSONObjectWithData:receivedData options:NSJSONReadingMutableContainers error:nil];
NSLog(@"%d", [jsonObjects count]);