I have this class:
public class Result
{
public int RegionId { get; set; }
public string LeagueName { get; set; }
public string Id { get; set; }
public string RegionName { get; set; }
public DateTime Date { get; set; }
public string SportName { get; set; }
public bool IsPreMatch { get; set; }
public int SportId { get; set; }
public string AwayTeam { get; set; }
public string HomeTeam { get; set; }
public string updated_at { get; set; }
public int LeagueId { get; set; }
public int? BetRadarId { get; set; }
public List<Market> Markets { get; set; }
public int our_event_id { get; set; }
}
But when the Market is empty, the API I depend on returns "Markets" : {}
instead of "Markets": []
so it can't be deserialized. How do I fix this?