/// <summary> /// Save a JSON object to a file on disk /// </summary> /// <param name="Location">The location of the file to read</param> /// <param name="Object">The object to save</param> public static void Save(FileReference Location, object Object) { string Text = Serialize(Object); try { DirectoryReference.CreateDirectory(Location.Directory); FileReference.WriteAllText(Location, Text); } catch (Exception Ex) { throw new Exception(String.Format("Unable to write '{0}'", Location), Ex); } }