input: def fetch_sql_data_api():
      """
      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 database named 'database.db', fetch all rows from the 'users' table, and return them as a JSON response.
  
      Example:
      If the 'users' table in 'database.db' contains the following data:
      | id | name  | age |
      |----|-------|-----|
      | 1  | Alice | 30  |
      | 2  | Bob   | 25  |
  
      Accessing the API endpoint '/' should return a JSON response similar to this:
      [
          {"id": 1, "name": "Alice", "age": 30},
          {"id": 2, "name": "Bob", "age": 25}
      ]
      """
output:     
      import sqlite3
      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 fetch_data():
          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)
  