I am having trouble with RestKit
when I had a JSON response with @
symbols in the keys. After some debugging it seems the issue is happening in __NSCFDictionary
So I tried the following simple code:
NSArray *keys = [NSArray arrayWithObjects:@"@key1", @"@key2", nil];
NSArray *objects = [NSArray arrayWithObjects:@"value1", @"value2", nil];
NSDictionary *dictionary = [NSDictionary dictionaryWithObjects:objects
forKeys:keys];
for (id key in dictionary) {
NSLog(@"key: %@, value: %@", key, [dictionary valueForKey:key]);
}
And I am getting the following error:
[<__NSDictionaryI 0x618000268ac0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key key1.
Can someone please explain why I am getting this error and if there is any workaround?