• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/web/json.php
  • Класс: BitrixMainWebJson
  • Вызов: Json::decode
static function decode($data)
{
	$res = json_decode($data, true);

	self::checkException();

	// PHP<5.3.3 returns no error for JSON_ERROR_UTF8 and some other ones
	if($res === null && strtolower($data) != 'null')
	{
		self::throwException(self::JSON_ERROR_UNKNOWN);
	}

	if (!Application::getInstance()->isUtfMode())
	{
		$res = self::unConvertData($res);
	}

	return $res;
}