我要求从家庭控制设备的JSON响应:NSJSONSerialization给我错误“重复键”
NSData* responseData = [NSData dataWithContentsOfURL:url];
的JSON数据responseData
是完整的,有效的。但是,如果我尝试
NSDictionary* dict = [NSJSONSerialization
JSONObjectWithData:responseData
options:kNilOptions
error:&error];
NSLog("Error: %@", error);
它给了我下面的错误:
Error: Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (Duplicate key for object around character 0.) UserInfo=0x6a8b8e0 {NSDebugDescription=Duplicate key for object around character 0.}
我在网上搜索,但至今未能找到任何帮助。
编辑:JSON响应它很长,所以不是在这里张贴,请找到它here。
如果显示使用JSON字符串,会更容易。 – MByD 2012-03-25 09:44:02