public function encode(array $args)
    {
        if (!$args) {
            return $args;
        }

        $serializable = [];

        foreach ($args as $arg) {
            $serializable[] = $this->serialize($arg);
        }

        return $serializable;
    }