修改发布的事件记录信息
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-10-11 16:25:52 +08:00
parent 2ee34b8e7c
commit 971c4dcf9e
9 changed files with 367 additions and 54 deletions
@@ -32,12 +32,18 @@ namespace IRaCIS.Core.Infrastructure.Extention
return JsonConvert.SerializeObject(obj, new JsonSerializerSettings { DateFormatString = "yyyy-MM-dd HH:mm:ss", ReferenceLoopHandling = ReferenceLoopHandling.Ignore, NullValueHandling = NullValueHandling.Ignore });
}
/// <summary>
/// 将对象序列化成稽查需要的Json字符串
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public static string ToJsonNotIgnoreNull(this object obj)
// 通过类型参数反序列化 JSON 字符串为指定类型的对象
public static object JsonStrToObject(this string jsonStr, Type type)
{
return JsonConvert.DeserializeObject(jsonStr, type);
}
/// <summary>
/// 将对象序列化成稽查需要的Json字符串
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public static string ToJsonNotIgnoreNull(this object obj)
{
return JsonConvert.SerializeObject(obj, new JsonSerializerSettings { DateFormatString = "yyyy-MM-dd HH:mm:ss", Formatting = Formatting.Indented, ReferenceLoopHandling = ReferenceLoopHandling.Ignore, NullValueHandling = NullValueHandling.Include });