• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/classes/general/rest.php
  • Класс: CRestServer
  • Вызов: CRestServer::outputJson
private function outputJson($data)
{
	try
	{
		$res = Json::encode($data);
	}
	catch(BitrixMainArgumentException $e)
	{
		$res = '{"error":"WRONG_ENCODING","error_description":"Wrong request encoding"}';
	}

	return $res;
}