如何在UIImageView中解析这个数据?
这是我的代码:
photos =(
{
height = 2988;
"html_attributions" = (
"<a href=\"https://maps.google.com/maps/contrib/109461257917544660371/photos\">Marie-Claude Brousseau</a>"
);
"photo_reference" = "CoQBdwAAAD1yAyXPTuN2ZyRD4VZGAqVTT3ZCWSLe_RHSLx_ea-GLe0TsaRSpqIsHhvTj82GljPJG5y-Lrk6809jI5KzvcUjXroCcaAlEkgDLhQma5xsvA0vF4DwdoEZ0wWUZxXHs01BxedzegpQSgB4zVnzbUaAZaN_D5dEr0UOp4awIExe2EhAISA1lOL6VARBNLg9a1r1tGhQf3RgXpVfnPBtYPH6RY5pqmJE0mQ";
width = 5312;
}
);
答案 0 :(得分:-1)
使用NSJSONSerialization类如下:
NSData *data = [photos dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *propertyList = [NSJSONSerialization JSONObjectWithData:data
options:0 error:NULL];