示例#1
0
 /// <summary>Saves Hjson to a file.</summary>
 public static void Save(JsonValue json, string path, HjsonOptions options = null)
 {
     if (Path.GetExtension(path).ToLower() == ".json")
     {
         json.Save(path, Stringify.Formatted); return;
     }
     using (var s = File.CreateText(path))
         Save(json, s, options);
 }
示例#2
0
 /// <summary>Saves Hjson to a file.</summary>
 public static void Save(JsonValue json, string path)
 {
     if (Path.GetExtension(path).ToLower() == ".json")
     {
         json.Save(path, true); return;
     }
     using (var s = File.CreateText(path))
         Save(json, s);
 }