// NSMutableArray *mutArr = [NSMutableArray array];
// [mutArr addObject:dict];
//
// NSMutableDictionary *dictbbb =[[NSMutableDictionary alloc]init];
// [dictbbb setObject:mutArr forKey:@"person"];
// NSLog(@"dictbbb is %@",dictbbb);
//
//
// NSData *dictData1 = [NSJSONSerialization dataWithJSONObject:dictbbb options:NSJSONWritingPrettyPrinted error:nil];
// NSString *jsonString1= [[NSString alloc]initWithData:dictData1 encoding:NSUTF8StringEncoding];
//
// NSLog(@"jsonbbbb str is %@",jsonString1);
ios中将字典放入到数组中,再将数组加入到字典中,再将整个字段转成json格式的。(网上比较少的实例)
最新推荐文章于 2022-05-14 10:40:35 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)