Return Standardized JSON Responses in AJAX Endpoints with JsonResponse
Outputs structured {success, message, data} JSON payloads with proper Content-Type headers and clean $app->close() termination.
<?php
declare(strict_types=1);
use Joomla\CMS\Factory;
use Joomla\CMS\Response\JsonResponse;
// ...