我希望我的媒体播放器(android)应该从这个 url 播放歌曲。我每天使用 JSON 文件更新我的播放列表文件。请帮助我,我被困住了,谢谢。
{
"json": {
"Songs": [
{
"song": "Song name ",
"Artist": "Sonjay singh",
"mp3": "http://c2lo.reverbnation.com/audio_player/download_song_direct/9140921.mp3"
},
{
"song": "SONG NAME",
"Artist": "aritist",
"mp3": "mp3_URL"
},
{
"song": "SONG NAME",
"Artist": "aritist",
"mp3": "mp3_URL"
}
]
}
}
我做了这门课,但仍然很难使用它。谢谢你的帮助。
public class Json{
private List songs;
public List getSongs(){
return this.songs;
}
public void setSongs(List songs){
this.songs = songs;
}
}
//
public class Songs{
private String artist;
private String mp3;
private String song;
public String getArtist(){
return this.artist;
}
public void setArtist(String artist){
this.artist = artist;
}
public String getMp3(){
return this.mp3;
}
public void setMp3(String mp3){
this.mp3 = mp3;
}
public String getSong(){
return this.song;
}
public void setSong(String song){
this.song = song;
}
}
//
public class SongsDataBase{
private Json json;
public Json getJson(){
return this.json;
}
public void setJson(Json json){
this.json = json;
}
}