You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
559 B
C#

11 months ago
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace DS.Module.Core;
public class CustomContractResolver : CamelCasePropertyNamesContractResolver
{
/// <summary>
/// 对长整型做处理
/// </summary>
/// <param name="objectType"></param>
/// <returns></returns>
protected override JsonConverter ResolveContractConverter(Type objectType)
{
if (objectType == typeof(long))
{
return new JsonConverterLong();
}
return base.ResolveContractConverter(objectType);
}
}