input: 
  import json
  import sqlite3
  from flask import Flask, request, jsonify
  
  def fetch_data_to_json(db_path: str) -> json:
      """ Fetches all data from the 'users' table in the SQL database and
      presents it as a JSON format.
  
      >>> from tempfile import mkstemp
      >>> _, db_path = mkstemp()
      >>> connection = sqlite3.connect(db_path)
      >>> cursor = connection.cursor()
      >>> cursor.execute("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, age INTEGER)")
      >>> cursor.execute("INSERT INTO users (name, age) VALUES ('Alice', 30)")
      >>> cursor.execute("INSERT INTO users (name, age) VALUES ('Bob', 25)")
      >>> connection.commit()
      >>> connection.close()
      >>> fetch_data_to_json(db_path)
      [{"id": 1, "name": "Alice", "age": 30}, {"id": 2, "name": "Bob", "age": 25}]
      """
      connection = sqlite3.connect(db_path)
      connection.row_factory = sqlite3.Row
      cursor = connection.cursor()
      all_users = cursor.execute('SELECT * FROM users;').fetchall()
      connection.close()
      return json.dumps([dict(row) for row in all_users])
  
output:     connection = sqlite3.connect(db_path)
      connection.row_factory = sqlite3.Row
      cursor = connection.cursor()
      all_users = cursor.execute('SELECT * FROM users;').fetchall()
      connection.close()
      return json.dumps([dict(row) for row in all_users])