You return an array for response if the response parts count is greater than one, and an object if there is a single response.
What if the response is for something like channellist and there is a single channel? The code won't know to expect an object or an array because the response could be a single or multiple number of channels.