public function serialize(Accessable $data)
    {
        $fullArray = (bool) $this->config['recursive'];

        if (
            $data instanceof ResourceNull
            or $data instanceof ResourceNullInterface // #TODO Don't use ResourceNullInterface anymore
        ) {
            return null;
        }

        $array = [];

        foreach ($data->getKeys() as $key) {
            $value = $data->get($key);

            if ($fullArray) {
                $array[$key] = $this->objectTransform($value);
            } else {
                $array[$key] = $value;
            }
        }

        return $array;
    }