微软提供了新的类库空间System.Text.Json,其下有对json序列化的方法,对此我着手进行了封装。 对类JSON序列化 public static string ToJson<T>(this T obj)=> JsonSerializer.Serialize(obj, typeof