jsonDecoder = $jsonDecoder; $this->jsonEncoder = $jsonEncoder; } /** * Encode the mixed $valueToEncode into the JSON format * * @param mixed $valueToEncode * @return string */ public function jsonEncode($valueToEncode) { return $this->jsonEncoder->encode($valueToEncode); } /** * Decodes the given $encodedValue string which is * encoded in the JSON format * * @param string $encodedValue * @return mixed */ public function jsonDecode($encodedValue) { return $this->jsonDecoder->decode($encodedValue); } }