additional_plugins/serendipity_event_spamblock_bee/json/json.php4.include.php

22 lines
576 B
PHP
Raw Normal View History

2012-07-07 13:32:50 +02:00
<?php
if( !function_exists('json_encode') || !function_exists('json_decode')) {
require_once dirname(__FILE__) . '/JSON.php';
}
// Future-friendly json_encode. Works with PHP4, too!
if( !function_exists('json_encode') ) {
function json_encode($data) {
$json = new Services_JSON();
return( $json->encode($data) );
}
}
// Future-friendly json_decode. Works with PHP4, too!
if( !function_exists('json_decode') ) {
function json_decode($data, $assoc= false) {
$json = new Services_JSON();
return( $json->decode($data) );
}
}