bool drd_info_rep::set_locals (tree t) { if (!is_func (t, COLLECTION)) return false; int i, n= N(t); for (i=0; i<n; i++) if (is_func (t[i], ASSOCIATE, 2) && is_atomic (t[i][0])) info (make_tree_label (t[i][0]->label))= tag_info (t[i][1]); return true; }
TagInfo InstagramParser::parse_tag_info(const std::string& json){ Json::Value root{}; if(!reader.parse(json, root, false)){ return "Failed to parse tag info"; } const Json::Value& data = root["data"]; TagInfo tag_info(data["name"].asString(), data["media_count"].asInt()); return tag_info; }
drd_info_rep::drd_info_rep (string name2, drd_info base): name (name2), info (tag_info (), base->info), env (UNINIT) {}
drd_info_rep::drd_info_rep (string name2): name (name2), info (tag_info ()), env (UNINIT) {}