Beispiel #1
0
 /**
  * Return a closing block if required
  *
  * @return string
  */
 public function getClosingBlock()
 {
     if ($this->format->isSingleBlock()) {
         return static::JSON_ARRAY_END;
     } else {
         return '';
     }
 }
Beispiel #2
0
 /**
  * @param string $string
  *
  * @return mixed
  */
 public function decodeJson($string)
 {
     return json_decode($string, $this->format->isJsonDecodeAssoc(), static::JSON_DEFAULT_DEPTH, $this->format->getJsonDecodeOptions());
 }