Пример #1
0
        public static void SaveJSON(string path)
        {
            JSONNode json = JSON.Parse("{}");

            foreach (var prop in typeof(Settings).GetProperties())
            {
                if (prop.Name != "File")
                {
                    json.AddTuple(prop.Name, prop.GetValue(null, null).ToString());
                }
            }
            var writer = new StreamWriter(path);

            writer.Write(json.Formatted());
            writer.Close();
        }