Every time an artist with an "&" symbol in their name comes up I get on my labels "R3HAB VINAI" instead of "R3HAB & VINAI" I would like to get the whole string as it is more useful to the end user. What is weird is the "&" symbol shows up in the track name just fine. Maybe someone can tell me what I'm doing wrong.
last.fm JSON API data from user.getRecentTracks
{
recenttracks:{
track:[
{
artist:{
#text:"R3HAB & VINAI",
mbid:"eb0fbe2c-6eb7-40bc-900b-3e056c158125"
},
name:"HOW WE PARTY",
streamable:"0",
mbid:"b410da12-f308-4e2f-af88-19c69312e450",
album:{
#text:"",
mbid:""
},
url:"https://www.last.fm/music/R3HAB+&+VINAI/_/HOW+WE+PARTY",
image:[
{
#text:"",
size:"small"
},
{
#text:"",
size:"medium"
},
{
#text:"",
size:"large"
},
{
#text:"",
size:"extralarge"
}
],
@attr:{
nowplaying:"true"
}
},
{
artist:{
#text:"Alan Walker",
mbid:""
},
name:"Sing me to Sleep",
streamable:"0",
mbid:"",
album:{
#text:"",
mbid:""
},
url:"https://www.last.fm/music/Alan+Walker/_/Sing+me+to+Sleep",
image:[
{
#text:"",
size:"small"
},
{
#text:"",
size:"medium"
},
{
#text:"",
size:"large"
},
{
#text:"",
size:"extralarge"
}
],
date:{
uts:"1501613749",
#text:"01 Aug 2017, 18:55"
}
}
],
@attr:{
user:"SomeName",
page:"1",
perPage:"1",
totalPages:"8676",
total:"8676"
}
}
}
C# class listing
public class Rootobject
{
public Recenttracks recenttracks { get; set; }
}
public class Recenttracks
{
public Track[] track { get; set; }
public Attr attr { get; set; }
}
public class Attr
{
public string user { get; set; }
public string page { get; set; }
public string perPage { get; set; }
public string totalPages { get; set; }
public string total { get; set; }
}
public class Track
{
public Artist artist { get; set; }
public string name { get; set; }
public string streamable { get; set; }
public string mbid { get; set; }
public Album album { get; set; }
public string url { get; set; }
public Image[] image { get; set; }
public Attr1 attr { get; set; }
public Date date { get; set; }
}
public class Artist
{
[JsonProperty("#text")]
public string text { get; set; }
public string mbid { get; set; }
}
public class Album
{
public string text { get; set; }
public string mbid { get; set; }
}
public class Attr1
{
public string nowplaying { get; set; }
}
public class Date
{
public string uts { get; set; }
public string text { get; set; }
}
public class Image
{
public string text { get; set; }
public string size { get; set; }
}