input: def fetch_data_from_sql_as_json():
      """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 records from the 'users' table, and return them as a JSON response.
      >>> fetch_data_from_sql_as_json()
      [{'id': 1, 'name': 'Alice', 'age': 30}, {'id': 2, 'name': 'Bob', 'age': 25}]
      """
output:     import sqlite3
      import json
  
      conn = sqlite3.connect('database.db')
      cursor = conn.cursor()
      cursor.execute("SELECT * FROM users")
      rows = cursor.fetchall()
      conn.close()
  
      columns = [desc[0] for desc in cursor.description]
      result = [dict(zip(columns, row)) for row in rows]
  
      return json.dumps(result)