This URL에서 Json 응답을 구문 분석하려고합니다. SBJsonParser, MTJSON 및 다른 파서를 사용했지만 세 가지 경우 모두 NULL이 표시됩니다. 59 : Google에서 json 응답을 구문 분석 할 수 없습니다
apiUrlStr = @"http://maps.google.com/maps?output=dragdir&saddr=Delhi&daddr=Mumbai+to:hyderabad";
NSURL* apiUrl = [NSURL URLWithString:apiUrlStr];
NSString *apiResponse = [NSString stringWithContentsOfURL:apiUrl encoding:NSUTF8StringEncoding error:nil];
SBJsonParser *json = [[[SBJsonParser alloc] init] autorelease];
NSDictionary *dictionary = [json objectWithString:apiResponse];
NSLog(@"dictionary=%@", [json objectWithString:apiResponse]);
2011-12-09 16
01.226 MapWithRoutes [2523 : 207] 사전 = (null가)
Plz은이
귀하의 게시물 핵심 부품의 알을 많이 누락되었습니다 :
당신이 무엇이 잘못되었는지 볼 수는 구문 분석 호출과 함께
NSError
객체를 제공 할 수 JSONkit를 사용한 경우 http://mattgemmell.com/2008/ 12/08/what-have-you-tried/ – rckoenes@rckoenes, 나는 그것이 아무것도없는 것 같지 않습니다. JSON은 어쨌든 디코딩하지 못합니다. –
그게 내가 말하는거야. 나는 지금 무엇을해야한다고 생각 하느냐? –