veselov.sumy.ua > PHP > Call to undefined function json_decode() json_encode()

Call to undefined function json_decode() json_encode()


28.01.10.
, json_decode() json_encode(). php 5.2.0.

:

http://mike.teczno.com/JSON.tar.gz

:
if( !function_exists('json_encode') ) {
function json_encode($data) {
$json = new Services_JSON();
return( $json->encode($data) );
}
}

// Future-friendly json_decode
if( !function_exists('json_decode') ) {
function json_decode($data, $bool) {
if ($bool) {
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
} else {
$json = new Services_JSON();
}
return( $json->decode($data) );
}
}


:
include("JSON.php");


-) , -)