Beispiel #1
0
 /**
  * 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();
 }
Beispiel #2
0
 /**
  * {@inheritDoc}
  */
 public function decode($json)
 {
     return $this->decoder->decode($json);
 }