/** * Encode an object into JSON * * @param mixed $object Object or array to json encode * @param bool $skipEncode Skip encoding, defaults to false. * @return string JSON encoded object. */ public static function jsonEncode($object, $skipEncode = false) { if (!$skipEncode) { $object = FireCake::stringEncode($object); } return json_encode($object); }
/** * Encode an object into JSON * * @param mixed $object Object or array to json encode * @param bool $skipEncode * @internal param bool $doIt * @static * @return string */ public static function jsonEncode($object, $skipEncode = false) { $_this = FireCake::getInstance(); if (!$skipEncode) { $object = FireCake::stringEncode($object); } return json_encode($object); }
/** * Encode an object into JSON * * @param mixed $object Object or array to json encode * @param boolean $doIt * @access public * @static * @return string **/ function jsonEncode($object, $skipEncode = false) { $_this = FireCake::getInstance(); if (!$skipEncode) { $object = FireCake::stringEncode($object); } if (function_exists('json_encode') && $_this->options['useNativeJsonEncode']) { return json_encode($object); } else { return FireCake::_jsonEncode($object); } }