using System; using System.Collections.Generic; using System.Linq; using System.Text.Encodings.Web; namespace PerformanceSolution.Tools { public static class JsonTools { public static Dictionary ConvertFromObjectToDictionary(object arg) { var properties = arg.GetType().GetProperties(); return properties.ToDictionary(property => property.Name, property => property.GetValue(arg)); } } }