input: def fetch_sql_data_to_json():
      """Develop an API in Python that fetches data from an SQL database and presents the data in the form of a JSON.
      >>> fetch_sql_data_to_json()
      { "1": {"id": 1, "name": "John", "age": 28}, "2": {"id": 2, "name": "Jane", "age": 24} }
      """
output:     import sqlite3
      import json
  
      conn = sqlite3.connect('example.db')
      cursor = conn.cursor()
  
      cursor.execute("CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, age INTEGER)")
      cursor.execute("INSERT OR IGNORE INTO users (id, name, age) VALUES (1, 'John', 28)")
      cursor.execute("INSERT OR IGNORE INTO users (id, name, age) VALUES (2, 'Jane', 24)")
  
      cursor.execute("SELECT * FROM users")
      rows = cursor.fetchall()
  
      data = {}
      for row in rows:
          data[str(row[0])] = {"id": row[0], "name": row[1], "age": row[2]}
  
      conn.close()
  
      return json.dumps(data, indent=4)