if(!function_exists('json_decode')){
include("json.php");
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
function json_decode($arr){
global $json;
return $json->decode($arr);
}
function json_encode($arr){
global $json;
return $json->encodeUnsafe($arr);
}
}JSON Class 的名稱為 Services_JSON
* @category * @package Services_JSON * @author Michal Migurski <mike-json@teczno.com> * @author Matt Knapp <mdknapp[at]gmail[dot]com> * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com> * @copyright 2005 Michal Migurski * @version CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $ * @license http://www.opensource.org/licenses/bsd-license.php * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
