protected function decodeObject($prefix, $namespace, &$object)
    {
        $customFields = ['namespace' => $namespace];
        foreach ($object as $key => $value) {
            if (false !== strpos($key, $prefix.'$')) {
                $fieldName = substr($key, \strlen($prefix) + 1);
                $customFields['data'][$fieldName] = $value;
            }
        }

        // In the case of an object-list response, namespaces are included for
        // all namespaces in any object in the result set. If a given namespace
        // is not used in a single object, we can skip custom fields entirely.
        if (!empty($customFields['data'])) {
            $object['customFields'][$namespace] = $customFields;
        }
    }