Logo Search packages:      
Sourcecode: dojo version File versions  Download package

Services_JSON Class Reference

List of all members.

Detailed Description

Converts to and from JSON format.

Brief example of use:

// create a new instance of Services_JSON $json = new Services_JSON();

// convert a complexe value to JSON notation, and send it to the browser $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); $output = $json->encode($value);

print($output); // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]

// accept incoming POST data, assumed to be in JSON notation $input = file_get_contents('php://input', 1000000); $value = $json->decode($input);

Definition at line 120 of file json.php.

Public Member Functions

 decode ($str)
 encode ($var)
 name_value ($name, $value)
 reduce_string ($str)
 utf162utf8 ($utf16)
 utf82utf16 ($utf8)

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index