4 #include <jsoncpp/json/json.h> 19 if (!Data.isMember(
"total_count")) {
23 if (!Data.isMember(
"photos")) {
27 std::int32_t total_count = Data[
"total_count"].asInt();
28 std::vector<std::vector<PhotoSize>> photos;
31 for (
int i = 0; i < Data[
"photos"].size(); i++) {
32 std::vector<PhotoSize> photo;
34 for (
int j = 0; j < Data[
"photos"][i].size(); j++) {
35 photo.push_back(fromJson<PhotoSize>(Data[
"photos"][i]));
37 if (photo.size() > 4) {
38 throw telegram_api_error(0,
"More than 4 photo sizes for a photo have been found, please check telegram api for changes");
41 photos.push_back(photo);
UserProfilePhotos fromJson(Json::Value Data)