input: 
  from typing import Optional
  import json 
  import sqlite3
  from flask import Flask, request, jsonify 
  
  def sql_to_json_api(database_name: str) -> Optional[str]:
      """ 
      Creates a basic API using Flask that fetches data from an SQL database and presents 
      it in JSON format. The API listens on the root ('/') endpoint and fetches all rows 
      from the 'users' table. The endpoint starts the Flask app and connects to the 
      specified database.
  
      >>> sql_to_json_api('test_database.db')
      'Data fetched and presented'
      >>> sql_to_json_api('non_existent.db')
      None
      """
  
output:     
      try:
          conn = sqlite3.connect(database_name)
          cursor = conn.cursor()
          cursor.execute("SELECT * FROM users")
          rows = cursor.fetchall()
          conn.close()
  
          app = Flask(__name__)
  
          @app.route('/')
          def index():
              return jsonify(rows)
  
          app.run(debug=True)
          return 'Data fetched and presented'
      except sqlite3.OperationalError:
          return None
  