I have a List<CampaignModel>
that I need to serialize using JsonConvert.SerializeObject
Everything works fine except Im getting the properties in a diferent order than the class declaration.
My class declaration is:
public class CampaignModel
{
public string Checked { get; set; }
public int CampaignId { get; set; }
public string Name { get; set; }
public string Market { get; set; }
public string Type { get; set; }
public bool IsActive { get; set; }
public bool Active { get; set; }
}
And the order Im getting the properties in my json is:
Any clue?