I am trying to make an http request. The code is as follows:
NSString *urlString = [NSString stringWithString:@"http://www.foo.se/bartojson.php?venue=47497"];
NSLog(@"retain %d urlString %@", [urlString retainCount], urlString );
NSURL *url = [NSURL URLWithString:urlString];
[urlString release];
NSString *jsonString = [NSString stringWithContentsOfURL:url];
NSDictionary *httpResult = [jsonString JSONValue];
When the page is called in the browser, the result is as follows:
{"name": "test", "description": "This is a test.", "reviews": [{"grade": "5", "description": "Nice"}, {"grade": "3" , "description": "Very nice!" }]}
But when you call it from code, I get the following:
Domain error = org.brautaset.JSON.ErrorDomain Code = 3 UserInfo = 0x582640 "Object value expected for the key: reviews"
There seems to be some issues with reviews pointing to the new dictionary. Could you please help me understand this error message.