我的代码:JSON解析问题
NSString *jsonString;
jsonString = [[NSMutableString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
// Create a dictionary from the JSON string
NSDictionary *results = [jsonString JSONValue];
NSLog(@"%@",jsonString);
// Build an array from the dictionary for easy access to each entry
NSArray *places = [results objectForKey:@"description"];
我没有得到结果我想要的。 当我调试代码时,我得到2个键/值对的NSArray地方的对象。
链路:HTTPS:?//maps.googleapis.com/maps/api/place/autocomplete/json输入=肖拉普尔&传感器=真键= AIzaSyC0K5UhV_BWmXhncIZEnbh-WG2RVQVgfdY – anjum 2012-02-06 12:20:13