Converts to and from JSON format.
Brief example of use:
1 // create a new instance of Services_JSON
2 $json = new Services_JSON();
3
4 // convert a complexe value to JSON notation, and send it to the browser
5 $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
6 $output = $json->encode($value);
7
8 print($output);
9 // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
10
11 // accept incoming POST data, assumed to be in JSON notation
12 $input = file_get_contents('php://input', 1000000);
13 $value = $json->decode($input);
Located in /JSON.php (line 115)
constructs a new JSON instance
object behavior flags; combine with boolean-OR
possible values:
decodes a JSON string into appropriate variable
encodes an arbitrary variable into JSON format
Documentation generated on Tue, 27 Jun 2006 22:54:25 -0700 by phpDocumentor 1.2.3