public static void NewtonsoftSerialize(object obj, string path) { FileSystemManager.CheckPathValidity(path.Remove(path.LastIndexOf('\\'))); File.WriteAllText(path, JsonConvert.SerializeObject(obj, Formatting.Indented)); }