protected function parseToJson($resBody, $requestId)
    {
        if ( ! $resBody) {
            return null;
        }

        $result = json_decode($resBody, true);

        if (is_null($result)) {
            throw new Exception ("[BadResponse] Bad format,not json: $resBody", 0, $requestId);
        }

        return $result;
    }
protected function parseToJson($resBody, $requestId)
    {
        if ( ! $resBody) {
            return null;
        }

        $result = json_decode($resBody, true);

        if (is_null($result)) {
            throw new Exception ("[BadResponse] Bad format,not json: $resBody", 0, $requestId);
        }

        return $result;
    }
protected function parseToJson ( $ resBody , $ requestId ) { if ( ! $ resBody ) { return null ; } $ result = json_decode ( $ resBody , true ) ; if ( is_null ( $ result ) ) { throw new Exception ( "[BadResponse] Bad format,not json: $resBody" , 0 , $ requestId ) ; } return $ result ; }
Decodes a JSON string to a JSON Object.
Unsuccessful decode will cause an Exception.

@return string
@throws Exception
Decodes a JSON string to a JSON Object . Unsuccessful decode will cause an Exception .