input: Write a python function to create a Flask route that returns the current time in JSON format.
  assert get_time() == {'time': datetime.now()}
output: from flask import Flask, jsonify
  from datetime import datetime
  
  app = Flask(__name__)
  
  @app.route('/time', methods=['GET'])
  def get_time():
      current_time = datetime.now().isoformat()
      return jsonify({'time': current_time})