input: def sql_to_json_api() -> str:
      """Develop an API in Python that fetches data from an SQL database and presents the data in the form of a JSON.
      The API should connect to a SQLite database named 'database.db', fetch all rows from the 'users' table,
      and return the data as a JSON response.
      >>> import requests
      >>> response = requests.get('http://127.0.0.1:5000/')
      >>> response.status_code == 200
      True
      >>> response.headers['Content-Type'] == 'application/json'
      True
      """
output:     
      import sqlite3
      import json
      from flask import Flask, jsonify
  
      app = Flask(__name__)
  
      def get_db_connection():
          conn = sqlite3.connect('database.db')
          conn.row_factory = sqlite3.Row
          return conn
  
      @app.route('/')
      def sql_to_json_api():
          conn = get_db_connection()
          users = conn.execute('SELECT * FROM users').fetchall()
          conn.close()
          return jsonify([dict(user) for user in users])
  
      if __name__ == '__main__':
          app.run(debug=True)
  