Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | <?php |
2 | |||
3 | require_once 'JSON/JSON.php'; |
||
4 | |||
8 | daniel-mar | 5 | if (!function_exists('json_encode')) { |
6 | function json_encode($arg) { |
||
7 | global $services_json; |
||
8 | if (!isset($services_json)) { |
||
9 | $services_json = new Services_JSON(); |
||
10 | } |
||
11 | return $services_json->encode($arg); |
||
2 | daniel-mar | 12 | } |
13 | } |
||
14 | |||
8 | daniel-mar | 15 | if (!function_exists('json_decode')) { |
16 | function json_decode($arg) { |
||
17 | global $services_json; |
||
18 | if (!isset($services_json)) { |
||
19 | $services_json = new Services_JSON(); |
||
20 | } |
||
21 | return $services_json->decode($arg); |
||
2 | daniel-mar | 22 | } |
23 | } |