我使用resultDictionary
来获取存储在数据库中的json数据。
当我尝试解析字典时,调试部分会告诉我这个[__NSCFString objectForKeyedSubscript:]
FMResultSet *resultSet = [db executeQuery:@"SELECT json FROM cacheinfo"];
while ([resultSet next]) {
dicDbResource = resultSet.resultDictionary;
results = dicDbResource[@"json"];
NSLog(@"bannerbooks:%@",results[@"BannerBooks"]);
}
结果打印如下:
results:{
BannerBooks = (
{
BannerIMGURL = "qqq";
BannerLink = "qqq";
linkISBN = "<null>";
},
{
BannerIMGURL = "qqq";
BannerLink = "qqq";
linkISBN = "<null>";
},
{
BannerIMGURL = "qqq";
BannerLink = "qqq";
linkISBN = "<null>";
},
)
}