79169468

Date: 2024-11-08 09:40:09
Score: 1
Natty:
Report link

Just add JsonPropertyOrder attribute to the property of your model which want to order list to it. but it's order number should be -1 to set the first order.

example:

utepublic class Vehicle
{
    [JsonPropertyOrder(-1)]
    public int Id { get; set; }
    public string? Manufacturer { get; set; }
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Seyyed Mahdi Seyyed Hosseini