コード例 #1
0
ファイル: 01.php プロジェクト: wyattearp/wyattearp.github.io
 /**
  * "private static" method,
  * 	choose json core function or Pear Service to encode
  */
 function __encode($input)
 {
     if (function_exists('json_encode')) {
         $result = json_encode($input);
     } else {
         require_once 'JSON.php';
         $json = new Services_JSON();
         $result = $json->encode($input);
     }
     return JSON::__rawjsonconvert($result);
 }