更新时间:2023-02-23 15:47:56
使用 SBJson :
NSDictionary *partialJsonDict = [[[yourIncomingJsonAsAString JSONValue] objectForKey:@"results"]] objectAtIndex:0];
NSDictionary *geometryDict = [partialJsonDict objectForKey:@"geometry"];
Float32 latitude = [[[geometryDict objectForKey:@"location"] objectForKey:@"lat"] floatValue];
Float32 latitude = [[[geometryDict objectForKey:@"location"] objectForKey:@"lng"] floatValue];
是的,真的很简单! ;)
Yes, it really is just that easy! ;)