/** * @return mixed|void */ protected function toJson() { $jsonCodec = new JsonCodec(); return $jsonCodec->encode($this); }
/** * Encodes an object as a JSON string. * * @param $object * the object to be represented as JSON encoded string. * * @return string * a string containing the JSON representation of the object. */ private static function jsonEncode($object) { return JsonCodec::encode($object); }