初步完成代码级重写通用接口功能
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// 宁波拓通e智造平台 ToTong Next Builder //
|
||||
// https://git.tuotong-tech.com/tnb/tnb.server //
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using Mapster;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace Tnb.Vengine;
|
||||
|
||||
public class TypeAdapter
|
||||
{
|
||||
public static TypeAdapterConfig IgnoreNull { get; }
|
||||
|
||||
static TypeAdapter()
|
||||
{
|
||||
TypeAdapterConfig.GlobalSettings.Default.PreserveReference(true);
|
||||
TypeAdapterConfig.GlobalSettings.NewConfig<JToken, JToken>().MapWith(json => json);
|
||||
TypeAdapterConfig.GlobalSettings.NewConfig<JObject, JObject>().MapWith(json => json);
|
||||
TypeAdapterConfig.GlobalSettings.NewConfig<JArray, JArray>().MapWith(json => json);
|
||||
IgnoreNull = TypeAdapterConfig.GlobalSettings.Clone();
|
||||
IgnoreNull.Default.IgnoreNullValues(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user