标签:fst mutable class web 转换 ati nss str ffffff
/*!*@brief把格式化的JSON格式的字符串转换成字典*@paramjsonStringJSON格式的字符串*@return返回字典*/+(NSDictionary*)dictionaryWithJsonString:(NSString*)jsonString{if(jsonString==nil){returnnil;}NSData*jsonData=[jsonStringdataUsingEncoding:NSUTF8StringEncoding];NSError*
/*! * @brief 把格式化的JSON格式的字符串转换成字典 * @param jsonString JSON格式的字符串 * @return 返回字典 */ + (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString { if (jsonString == nil) { return nil; } NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; NSError *err; NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&;err]; if(err) { NSLog(@"json解析失败:%@",err); return nil; } return dic; }
标签:fst mutable class web 转换 ati nss str ffffff
原文地址:https://www.cnblogs.com/StevenHuSir/p/10291293.html