json字符串转化为NSArray

NSMutableString *jsonDataString=[NSMutableString string];

    

    [jsonDataString setString:[NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"jsonData" ofType:@"txt"] encoding:NSUTF8StringEncoding error:nil]];

    NSData *nsData=[jsonDataString dataUsingEncoding:NSUTF8StringEncoding];

    parsedArray=[NSJSONSerialization JSONObjectWithData:nsData options:kNilOptions error:nil];

你可能感兴趣的:(json字符串转化为NSArray)