public class Entry
{
public string playerOrTeamId { get; set; }
public string playerOrTeamName { get; set; }
public string division { get; set; }
public int leaguePoints { get; set; }
public int wins { get; set; }
public int losses { get; set; }
public bool isHotStreak { get; set; }
public bool isVeteran { get; set; }
public bool isFreshBlood { get; set; }
public bool isInactive { get; set; }
}
public class SummonerId
{
public string name { get; set; }
public string tier { get; set; }
public string queue { get; set; }
public List<Entry> entries { get; set; }
}
public class RootObject
{
public List<SummonerId> Summoner_Id { get; set; }
}
I have genereated this class using Json2csharp.com.
Where the class has 1 List I am able to access the data with no problems.
But with this class generated 2 Lists. I think I am over thinking now and have become very confused..
How can I deserialize this class
string url = json.ToString();
var root = JsonConvert.DeserializeObject<RootObject>(url):
Summoner_Id returns as null.
var id = root.Summoner_Id;
root returns as null also..
How can I solve this? Please help or point me in the right direction!
var root = JsonConvert.DeserializeObject<Summoner_Id>(url)and rename yourSummonerIdclass toSummoner_Id