input: from typing import Dict
  
  def list_countries() -> Dict[str, str]:
      """ Create a basic REST API using Python and Flask to list all the countries in the world.
      The API should serve the list when a GET request is made to the '/countries' endpoint.
      The list of countries should be read from a JSON file called 'data.json'.
      
      Example:
      >>> list_countries()
      {'Afghanistan': 'Kabul', 'Albania': 'Tirana', 'Algeria': 'Algiers', ...}
      """
output:     
      import json
      from flask import Flask, jsonify
  
      app = Flask(__name__)
  
      @app.route('/countries', methods=['GET'])
      def get_countries():
          with open('data.json', 'r') as file:
              countries = json.load(file)
          return jsonify(countries)
  
      if __name__ == '__main__':
          app.run(debug=True)
  