Class Services_JSON
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);
Package: Services\JSON
Copyright: 2005 Michal Migurski
License: http://www.opensource.org/licenses/bsd-license.php
Author: Michal Migurski <mike-json@teczno.com>
Author: Matt Knapp <mdknapp[at]gmail[dot]com>
Author: Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
Located at vendors/json/json.php
Copyright: 2005 Michal Migurski
License: http://www.opensource.org/licenses/bsd-license.php
Author: Michal Migurski <mike-json@teczno.com>
Author: Matt Knapp <mdknapp[at]gmail[dot]com>
Author: Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
Located at vendors/json/json.php
Methods summary
public
|
|
public
string
|
|
public
string
|
|
public
mixed
|
|
public
string
|
#
name_value( string $name, mixed $value )
array-walking function for use in generating JSON-formatted name-value pairs |
public
string
|
#
reduce_string( mixed $str )
reduce a string by removing leading and trailing comments and whitespace |
public
mixed
|
|
public
|