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