additional_plugins/serendipity_event_commentspice/json/json.php4.include.php
Grischa Brockhaus 6009368879 comment_spice:
* Handle twitternames
* Article promotion started, Ajax ready.
2012-06-29 13:09:01 +02:00

22 lines
576 B
PHP

<?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) );
}
}