I have the "json" mentioned below. "changes" property is changeable
{"sort":[{"field":"recid","direction":"desc"}],"changes":[{"recid":2084,"LokasyonAdresi":"211","LokasyonAdi":"111"}],"action":"save"}
When I convert json to c# classes, the following classes are created.
public class Sort
{
public string field { get; set; }
public string direction { get; set; }
}
public class Change
{
public int recid { get; set; }
public string LokasyonAdresi { get; set; }
public string LokasyonAdi { get; set; }
}
public class Root
{
public List<Sort> sort { get; set; }
public List<Change> changes { get; set; }
public string action { get; set; }
}
I want the class I want to convert to be like this. How can I customize?
public class Root
{
[JsonPropertyName("sort")]
public IList<Sort> Sort { get; set; }
[JsonPropertyName("action")]
public string Action { get; set; }
[JsonPropertyName("changes")]
public IDictionary<string, object> Changes { get; set; }
}