- Posts: 2
- Thank you received: 0
Please Log in to join the conversation.
// Future-friendly json_encode
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) );
}
}
// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
include_once( 'JSON.php' );
// Require the base controller
require_once( JPATH_COMPONENT.DS.'controller.php' );
Please Log in to join the conversation.
Please Log in to join the conversation.
Copyright © 2022 Sysgen Media LLC · Sysgen Media® is a registered trademark of Sysgen Media LLC