using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Fuel01 { public static class Utils { public static bool SaveToJson(string filename, T ds) { try { var result = JsonConvert.SerializeObject(ds,Formatting.Indented); File.WriteAllText(filename, result); return true; } catch { return false; } } } }