src/HttpClient.php
protected static function parseJSONResponse($response)
    {
        $result = json_decode($response->body, true);
        if ($result == null) {
            $error = json_last_error();
            throw new Error(
                "Error parsing server response ({$response->responseCode}) - {$response->body}. Got - {$error}"
            );
        }

        return $result;
    }
protected static function parseJSONResponse($response)
    {
        $result = json_decode($response->body, true);
        if ($result == null) {
            $error = json_last_error();
            throw new Error(
                "Error parsing server response ({$response->responseCode}) - {$response->body}. Got - {$error}"
            );
        }

        return $result;
    }
protected static function parseJSONResponse ( $ response ) { $ result = json_decode ( $ response -> body , true ) ; if ( $ result == null ) { $ error = json_last_error ( ) ; throw new Error ( "Error parsing server response ({$response->responseCode}) - {$response->body}. Got - {$error}" ) ; } return $ result ; }
Parses JSON string from response body.

@param \stdClass $response Class representing response

@return mixed Decoded JSON object

@throws Error
Parses JSON string from response body .