文章目录
问题
描述
reason __NSCFString * “[<__NSDictionaryI 0x600003e03c80> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key pos_index.” 0x00006000021b7980
图片
分析
查看源数据, 可以看到
这个objectInfo字段指向的是一个不可变数组
修复前的数据源字典
修复后的数据源字典处理
查看修复之后的数据源
核心修复代码
添加的修复代码为
NSData *data= [NSJSONSerialization dataWithJSONObject:resDic options:NSJSONWritingPrettyPrinted error:nil];
resDic = [NSJSONSerialization JSONObjectWithData:data
options:NSJSONReadingMutableContainers
error:nil];