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 114 of file JSON.php.


Public Member Functions

 decode ($str)
 decode ($str)
 encode ($var)
 encode ($var)
 name_value ($name, $value)
 name_value ($name, $value)
 reduce_string ($str)
 reduce_string ($str)
 Services_JSON ($encoding=SERVICES_JSON_UTF_8, $use=SERVICES_JSON_STRICT_TYPE)
 Services_JSON ($use=SERVICES_JSON_STRICT_TYPE)
 utf162utf8 ($utf16)
 utf162utf8 ($utf16)
 utf82utf16 ($utf8)
 utf82utf16 ($utf8)

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

Generated by  Doxygen 1.6.0   Back to index