is there someone who can help me with the serialization of IList<IShows>. I managed to serialize it with help of JsonConvert.SerializeObject but ... Let's say I have classes like:
public class Show : IShow
{
public string Name { get; set; }
public IList<IEpisode> Episodes { get; set; }
public int Count { get; set; }
}
public class Episode : IEpisode
{
public string Name { get; set; }
public DateTime Date { get; set; }
public IList<ILink> Links { get; set; }
}
public class Link : ILink
{
public string URL { get; set; }
public string Name { get; set; }
public string Quality { get; set; }
}
I'm getting something like:
[
{
"Name": "Supernatural",
"Episodes": [
{
"Name": "There's Something About Mary",
"Date": "2017-05-12T02:20:05+01:00",
"Links": [
{
"URL": "url",
"Name": "HDTV",
"Quality": "480p"
},
{
"URL": "url",
"Name": "HDTV",
"Quality": "720p"
}
]
}
]
}
]
but I would like to add additional tag before each show (show) and another tag (shows) before all shows.
Does someone know how to do it?