/** * Use the JSON encoding scheme for the value specified * * @param mixed $value value the object to be encoded * @return string The encoded value */ public static function encode($value) { if (empty($value)) { return 'null'; } $encoder = new Zend_Json_Encoder(); return $encoder->_encodeValue($value); }
/** * Use the JSON encoding scheme for the value specified * * @param mixed $value The value to be encoded * @param boolean $cycleCheck Whether or not to check for possible object recursion when encoding * @return string The encoded value */ public static function encode($value, $cycleCheck = false) { $encoder = new Zend_Json_Encoder($cycleCheck ? true : false); return $encoder->_encodeValue($value); }
/** * Use the JSON encoding scheme for the value specified * * @param mixed $value value the object to be encoded * @return string The encoded value */ public static function encode($value) { $encoder = new Zend_Json_Encoder(); return $encoder->_encodeValue($value); }