input: Write a function to create an API endpoint in Python that fetches data from an SQL database table named 'users' and returns the data in JSON format. The endpoint should connect to an SQL database file named 'database.db'. If the 'users' table is empty, return an empty JSON object.
  assert test_api_endpoint_users()=={"id": 1, "name": "Alice", "age": 30}
  assert test_api_endpoint_users()=={"id": 2, "name": "Bob", "age": 25}
  assert test_api_endpoint_users()=={}
output: 
  import sqlite3
  import json
  
  def test_api_endpoint_users():
      conn = sqlite3.connect('database.db')
      cursor = conn.cursor()
      cursor.execute("SELECT * FROM users LIMIT 1")
      row = cursor.fetchone()
      conn.close()
      if row:
          return json.dumps(dict(zip([column[0] for column in cursor.description], row)))
      else:
          return json.dumps({})
  