/** * Turn a string into an object graph * * @param string $string * @param string $type * @return mixed */ public function deserialize($string, $type) { $this->visitor->visitType(Type::fromString($type)); $value = $this->decoder->decode($string); $this->navigator->accept($this->navigator, $this->visitor, $value); return $this->visitor->getResult(); }
/** * {@inheritDoc} */ public function decode($json) { return $this->decoder->decode($json); }