mirror of
https://github.com/tribufu/tribufu-dotnet
synced 2026-05-06 06:37:28 +00:00
Update BaseClassFirstContractResolver.cs
This commit is contained in:
parent
3edec858a8
commit
32a2a20fb1
1 changed files with 1 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue