itsolution/module/shop/pg/agspay/lib/JSONFunc.php
2021-10-26 18:21:20 +09:00

22 lines
530 B
PHP

<?
if (!function_exists('json_decode')) {
function json_decode($content, $assoc=false) {
require_once 'JSON.php';
if ($assoc) {
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
}
else {
$json = new Services_JSON;
}
return $json->decode($content);
}
}
if (!function_exists('json_encode')) {
function json_encode($content) {
require_once 'JSON.php';
$json = new Services_JSON;
return $json->encode($content);
}
}
?>