Closed ZengSir closed 8 years ago
内部的字典也会生成对应的类的
但是这个内部的字典 的key 也是变化的, 而且是中文。 生成之后,就会出现如下代码: @property (copy, nonamic) NSString *你好; 如果方便的话,你转换试一下。
我遇到的实际问题是,后台返回的数据如下: {"Value":true,"Detail":{"免费兑换":{"免费兑换":[{"ParentSortName":"免费兑换","SubSortName":"免费兑换"}]},"幸运抽奖":{"1元":[{"ParentSortName":"幸运抽奖","SubSortName":"1元"}],"免费":[{"ParentSortName":"幸运抽奖","SubSortName":"免费"}]}},"ErrorMessage":null,"OtherMessage":null}
格式化后如下:
{ "name": "王五", "gender": "man", "age": 15, "height": "140cm", "addr": { "province": "fujian", "city": "quanzhou", "code": "300000" }, "你好": [ { "name": "billiards", "code": "1" }, { "name": "computerGame", "code": "2" } ] }