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.
24 lines
646 B
C#
24 lines
646 B
C#
5 months ago
|
using System;
|
||
|
using Newtonsoft.Json;
|
||
|
using Newtonsoft.Json.Serialization;
|
||
|
|
||
|
namespace DS.WMS.PrintApi.Utils
|
||
|
{
|
||
|
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);
|
||
|
}
|
||
|
}
|
||
|
}
|