ios json

NSString *strr = @"{\"cityName\":\"市\"}";

    NSError *er = nil;
    id js = [NSJSONSerialization JSONObjectWithData:[strr dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers | NSJSONReadingMutableLeaves error:&er];
    NSLog(@" %@ ", [js objectForKey:@"cityName"]);

猜你喜欢

转载自jayrao5566.iteye.com/blog/1906796
今日推荐