src/Valkyrja/Http/NativeResponseBuilder.php
public function json(array $data = [], int $statusCode = StatusCode::OK, array $headers = []): JsonResponse
    {
        return $this->app->json($data, $statusCode, $headers);
    }
public function json(array $data = [], int $statusCode = StatusCode::OK, array $headers = []): JsonResponse
    {
        return $this->app->json($data, $statusCode, $headers);
    }
Json response builder.

@param array $data       [optional] The data to set
@param int   $statusCode [optional] The response status code
@param array $headers    [optional] An array of response headers

@return \Valkyrja\Http\JsonResponse