سلام من یه response از یه ادرسی دریافت میکنم
مشکل اینجاست مثلا مثل کد پایین یه سری از idها فیلد Album دارن ولی یسری دیگه ندارن
"id": 100586,
"title": "Nima Masiha - "Payane Harfat"",
"explicit": false,
"link": "https://host2.media-rj.com/media/mp3/mp3-256/100586-c4f8f2a8b0ab46c.mp3",
"photo": "https://assets.rjassets.com/static/mp3/nima-masiha-payane-harfat/53f262f2a744c95.jpg",
"thumbnail": "https://assets.rjassets.com/static/mp3/nima-masiha-payane-harfat/53f262f2a744c95-thumb.jpg",
"plays": "13,985",
"artist": "Nima Masiha",
"song": "Payane Harfat",
"photo_240": "https://assets.rjassets.com/static/mp3/nima-masiha-payane-harfat/53f262f2a744c95-photo_240x180.jpg",
"likes": "59",
"dislikes": "0",
"downloads": "13,985",
"photo_player": "https://assets.rjassets.com/static/mp3/nima-masiha-payane-harfat/0d94a4933725f08-player.jpg",
"permlink": "Nima-Masiha-Payane-Harfat",
"share_link": "https://rjapp.app/m/4qL514Nl",
"created_at": "2021-09-18T11:45:50-04:00",
"type": "mp3",
"duration": 256.496,
"hls_link": "https://host2.media-rj.com/media/mp3/mp3-hls/100586-c4f8f2a8b0ab46c/playlist.m3u8",
"lq_link": "https://host2.media-rj.com/media/mp3/aac-128/100586-c4f8f2a8b0ab46c.m4a",
"hq_link": "https://host2.media-rj.com/media/mp3/aac-256/100586-c4f8f2a8b0ab46c.m4a",
"lq_hls": "https://host2.media-rj.com/media/mp3/mp3-hls/100586-c4f8f2a8b0ab46c/file-96k.m3u8",
"hq_hls": "https://host2.media-rj.com/media/mp3/mp3-hls/100586-c4f8f2a8b0ab46c/playlist.m3u8",
"lufs": -5.9,
"artist_tags": [
"Nima Masiha"
],
"bg_colors": [
"#c19b8f",
"#976453"
]
"id": 100622,
"title": "Arman Miladi & Amin Tijay, & Young Sudden - "Gangsta"",
"explicit": false,
"link": "https://host2.media-rj.com/media/mp3/mp3-256/100622-ba2f07903aabf74.mp3",
"photo": "https://assets.rjassets.com/static/mp3/arman-miladi-amin-tijay-young-sudden-gangsta/b2a6cfac0d2ae28.jpg",
"thumbnail": "https://assets.rjassets.com/static/mp3/arman-miladi-amin-tijay-young-sudden-gangsta/b2a6cfac0d2ae28-thumb.jpg",
"plays": "113,477",
"artist": "Arman Miladi & Amin Tijay, & Young Sudden",
"song": "Gangsta",
"photo_240": "https://assets.rjassets.com/static/mp3/arman-miladi-amin-tijay-young-sudden-gangsta/b2a6cfac0d2ae28-photo_240x180.jpg",
"likes": "262",
"dislikes": "2",
"downloads": "113,477",
"photo_player": "https://assets.rjassets.com/static/mp3/arman-miladi-amin-tijay-young-sudden-gangsta/e7cdced05eec6ab-player.jpg",
"permlink": "Arman-Miladi-Amin-Tijay-Young-Sudden-Gangsta",
"share_link": "https://rjapp.app/m/ZEwRZwrv",
"created_at": "2021-09-20T06:24:46-04:00",
"type": "mp3",
"duration": 239.073,
"hls_link": "https://host2.media-rj.com/media/mp3/mp3-hls/100622-ba2f07903aabf74/playlist.m3u8",
"lq_link": "https://host2.media-rj.com/media/mp3/aac-128/100622-ba2f07903aabf74.m4a",
"hq_link": "https://host2.media-rj.com/media/mp3/aac-256/100622-ba2f07903aabf74.m4a",
"lq_hls": "https://host2.media-rj.com/media/mp3/mp3-hls/100622-ba2f07903aabf74/file-96k.m3u8",
"hq_hls": "https://host2.media-rj.com/media/mp3/mp3-hls/100622-ba2f07903aabf74/playlist.m3u8",
"lufs": -9.1,
"album": {
"id": 2328,
"album": "El Quatro",
"artist": "Arman Miladi",
"track": 2,
"share_link": "https://rjapp.app/ma/KwEoQGpV"
},
"artist_tags": [
"Arman Miladi & Amin Tijay, & Young Sudden"
],
"bg_colors": [
"#e63629",
"#971b12"
]
الان من چجوری باید این json رو به کلاس جاوا تبدیل کنم از کد زیر استاده کردم ولی جواب نداد چون یسری از ایدیها album ندارن
public int id;
public String title;
public boolean explicit;
public String link;
public String photo;
public String thumbnail;
public String plays;
public String artist;
public String song;
public String photo_240;
public String likes;
public String dislikes;
public String downloads;
public String photo_player;
public String permlink;
public String share_link;
public String created_at;
public String type;
public double duration;
public String hls_link;
public String lq_link;
public String hq_link;
public String lq_hls;
public String hq_hls;
public double lufs;
public List<String> artist_tags;
public List<String> bg_colors;
public Album album;