/// <summary> /// 将对象转换为json格式的字符串(忽略null值) /// </summary> /// <typeparam name="T">对象类型</typeparam> /// <param name="obj"></param> /// <returns>json格式的字符串</returns> public static string ToJsonIgnoreNull <T>(this T obj) { return(NewtonsoftJsonSerializer.GetJsonByObjIgnorreNull(obj)); }