blob: b36c2a4d7cc8bec9411be8ee216269400a64ba4a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
if (!function_exists('json_decode')) {
function json_decode($content, $assoc=false) {
require_once 'lib/JSON/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 'lib/JSON/JSON.php';
$json = new Services_JSON;
return $json->encode($content);
}
}
|