public function serialize()
	{
		$it = new SerializedTokenIterator([]);

		$this->preSerialize($it);

		foreach($this->tokens as $token)
		{
			$token->serialize($it);
		}

		$this->postSerialize($it);
		
 		return json_encode($it->getArrayCopy());
	}