我想分析从SBJSON框架以下网址从而适用于iOS的JSON输出http://maps.google.com/maps?q=school&mrt=yp&sll=13.006389,80.2575&output=json
while(1);{title:"school - Google Maps",url:"/maps?q=school\x26mrt=yp\x26sll=13.006389,80.2575\x26ie=UTF8\x26hq=school\x26hnear=",urlViewport:false,ei:"RCu3T4eeMqSiiAe7k-yZDQ",form:{selected:"q",q:{q:"school",mrt:"yp",what:"school",near:""},d:{saddr:"",daddr:"",dfaddr:""},geocode:""},
我使用http://www.bodurov.com/JsonFormatter/网上阅读。
在ASIHttpRequest响应方法我而除去(1); 从响应
NSString *responseString = [[request resonseString]substringFromIndex:9]; //to remove while(1)
SBJSONParser * parser = [[SBJSONParser alloc]init];
NSDictionary *jsonDict = (NSDictionary*)[parser objectFromString:responseString];
NSLog(@"%@",jsonDict) // prints null
// [responseString JSONValue] also reports error
我想没有双引号引起问题JSON关键。
取代{ “称号”: “医院-谷歌地图”, “urlViewport”:假,},我们得到{ 标题: “医院-谷歌地图”, “urlViewport”:假}
请帮我解析从谷歌返回这个复杂的JSON结构。