public function toJson($admin = false)
	{
		$data = $this->prepareDataToJson($admin);

		if (count($data) == 0)
		{
			return '{}';
		}

		return json_encode($data);
	}
public function toJson($admin = false)
	{
		$data = $this->prepareDataToJson($admin);

		if (count($data) == 0)
		{
			return '{}';
		}

		return json_encode($data);
	}
public function toJson ( $ admin = false ) { $ data = $ this -> prepareDataToJson ( $ admin ) ; if ( count ( $ data ) == 0 ) { return '{}' ; } return json_encode ( $ data ) ; }
Return the data as JSON

@param bool $admin
@return string|void
Return the data as JSON