using Newtonsoft.Json; namespace Core { public static class SerializeGate { public static T Gate(T anything) { var json = JsonConvert.SerializeObject(anything); return JsonConvert.DeserializeObject(json)!; } } }