标签:dict error: erro tty nbsp obj span return 字符
/**
* json转字符串声明
*/
+ (NSString *)jsonToString:(NSDictionary *)dic;
/**
* json转字符串实现
*/
+ (NSString *)jsonToString:(NSDictionary *)dic
{
if(!dic){
return nil;
}
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingPrettyPrinted error:nil];
return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
}
标签:dict error: erro tty nbsp obj span return 字符
原文地址:http://www.cnblogs.com/iQingYang/p/6687680.html