<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_task_detail2(self, task_name):
 """ Get task's detail v2 :param task_name: task name :return: the task's detail :rtype: list or dict according to the JSON """


        from ..compat import json  # fix object_pairs_hook parameter for Py2.6

        params = {'detail': '',
                  'taskname': task_name}

        resp = self._client.get(self.resource(), params=params)
        res = resp.text if six.PY3 else resp.content
        try:
            return json.loads(res, object_pairs_hook=OrderedDict)
        except ValueError:
            return res