mirror of
https://github.com/tribufu/tribufu-dotnet
synced 2026-06-01 09:42:35 +00:00
Update BaseClassFirstContractResolver.cs
This commit is contained in:
parent
936f7f0f5e
commit
3edec858a8
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)
|
protected override IList<JsonProperty> CreateProperties(Type type, MemberSerialization memberSerialization)
|
||||||
{
|
{
|
||||||
var props = base.CreateProperties(type, memberSerialization);
|
var props = base.CreateProperties(type, memberSerialization);
|
||||||
return props.OrderBy(p => { return p.DeclaringType == type ? 1 : 0; }).ToList();
|
return props.OrderBy(p => !string.Equals(p.PropertyName, "id", StringComparison.OrdinalIgnoreCase)).ThenBy(p => p.DeclaringType != type).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue