mirror of
https://github.com/tribufu/tribufu-dotnet
synced 2025-08-01 21:23:28 +00:00
Update BaseClassFirstContractResolver.cs
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Tribufu.Serialization
|
||||
protected override IList<JsonProperty> CreateProperties(Type type, MemberSerialization memberSerialization)
|
||||
{
|
||||
var props = base.CreateProperties(type, memberSerialization);
|
||||
return props.OrderBy(p => !string.Equals(p.PropertyName, "id", StringComparison.OrdinalIgnoreCase)).ThenBy(p => p.DeclaringType != type).ToList();
|
||||
return props.OrderBy(p => { return p.DeclaringType == type ? 1 : 0; }).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user