/**
  * 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 ZendJsonEncoder($cycleCheck ? true : false);
     return $encoder->_encodeValue($value);
 }
Beispiel #2
0
 function json_encode($v)
 {
     return ZendJsonEncoder::encode($v);
 }