# File lib/json/editor.rb, line 1225
      def store_file(path)
        if path
          data = Editor.model2data(@treeview.model.iter_first)
          File.open(path + '.tmp', 'wb') do |output|
            data or break
            if @options_menu.pretty_item.active?
              output.puts JSON.pretty_generate(data, :max_nesting => false)
            else
              output.write JSON.generate(data, :max_nesting => false)
            end
          end
          File.rename path + '.tmp', path
          @filename = path
          toplevel.display_status("Saved data to '#@filename'.")
          unchange
        end
      rescue SystemCallError => e
        Editor.error_dialog(self, "Failed to store JSON file: #{e}!")
      end