【发布时间】:2013-02-12 00:36:29
【问题描述】:
我正在使用 JSONKit 作为 NSMutableDictionary 解析 JSON 数据。
NSString *str = [[NSString alloc] initWithData:self.responseData encoding:NSUTF8StringEncoding];
NSMutableDictionary *jsonResponse = [self.responseData objectFromJSONData];
NSMutableDictionary *newData = [[NSMutableDictionary alloc] init];
[newData addEntriesFromDictionary:[jsonResponse mutableCopy]];
当我这样做时,我得到了这个错误:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSMutableDictionary addEntriesFromDictionary:]: dictionary argument is not an NSDictionary'
我正在尝试找出导致此问题的原因。根据我的其他经验,我知道 jsonResponse 是 JKArray 的一个对象。
我需要帮助。 谢谢。
【问题讨论】: