private function deserializeObjectList(ResponseInterface $response, ObjectListQuery $byFields): ObjectList
    {
        $data = $response->getBody();

        /** @var ObjectList $list */
        $list = $this->deserialize($data, ObjectList::class);

        // Set the json representation of each entry in the list.
        $decoded = \GuzzleHttp\json_decode($data, true);
        foreach ($list as $index => $item) {
            $entry = $decoded['entries'][$index];
            if (isset($decoded['$xmlns'])) {
                $entry['$xmlns'] = $decoded['$xmlns'];
            }
            $item->setJson(\GuzzleHttp\json_encode($entry));
        }
        $list->setObjectListQuery($byFields);
        $list->setDataObjectFactory($this);

        return $list;
    }