def output_json_errors
      errors_as_hashes = errors.map do |err|
        {
          filename:    err.filename,
          line_number: err.line_number,
          message:     err.message
        }
      end

      File.open(@options['output-file'], 'w+') do |file|
        file.write JSON.dump(errors_as_hashes)
      end
    end
def output_json_errors
      errors_as_hashes = errors.map do |err|
        {
          filename:    err.filename,
          line_number: err.line_number,
          message:     err.message
        }
      end

      File.open(@options['output-file'], 'w+') do |file|
        file.write JSON.dump(errors_as_hashes)
      end
    end
output errors with json format.