• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/httprequest.php
  • Класс: BitrixMainHttpRequest
  • Вызов: HttpRequest::isJson
public function isJson(): bool
{
	$contentType = $this->headers->getContentType();
	if (!$contentType)
	{
		return false;
	}
	if ($contentType === 'application/json')
	{
		return true;
	}

	return str_contains($contentType, '+json');
}