public static string SerializeObject(object obj, BindingFlags membersType) {
var typeConfigType = typeof(TypeConfig<>).MakeGenericType(obj.GetType());
var prop = typeConfigType.GetMembers(BindingFlags.Public | BindingFlags.Static).FirstOrDefault(item => item.Name == "Fields") as PropertyInfo;
prop.SetValue(null, obj.GetType().GetFields(membersType), null);
prop = typeConfigType.GetMembers(BindingFlags.Public | BindingFlags.Static).FirstOrDefault(item => item.Name == "Properties") as PropertyInfo;
prop.SetValue(null, new PropertyInfo[0], null);
return JsonSerializer.SerializeToString(obj);
}