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()
      
      """
output:     
      import sqlite3
      import json
  
      conn = sqlite3.connect('example.db')
      cursor = conn.cursor()
  
      cursor.execute("SELECT * FROM my_table")
      rows = cursor.fetchall()
  
      column_names = [description[0] for description in cursor.description]
      data = [dict(zip(column_names, row)) for row in rows]
  
      conn.close()
  
      return json.dumps(data)
  