iOS开发 字符串转换成字典

//字符串 转换成字典 
+(NSMutableDictionary *)parseJsonData:(NSString *)result{
    
    NSError *error;
    
    NSData  *data = [result dataUsingEncoding:NSUTF8StringEncoding];
    
    NSMutableDictionary  *dictionaryFromJson = [NSJSONSerialization JSONObjectWithData:data
                                                                              options:NSJSONReadingMutableLeaves
                                                                                error:&error];
    //   NSLog(@"%@-->%@",dictionaryFromJson,[error description]);
    return dictionaryFromJson;
}


你可能感兴趣的:(ios,NSString,字典)