namespace IStation.Model { /// /// /// public abstract class JsonList : JsonModel where T : class, new() { /// /// To json /// public static string ToJson(List list) { if (list == null || list.Count < 1) return default; return JsonHelper.Object2Json(list); } /// /// To list /// public static List ToList(string json) { if (string.IsNullOrEmpty(json)) return null; try { return JsonHelper.Json2Object>(json); } catch { return null; } } } }