Constants

SERVICES_JSON_SLICE

Marker constant for Services_JSON::decode(), used to flag stack state

« More »

SERVICES_JSON_IN_STR

Marker constant for Services_JSON::decode(), used to flag stack state

« More »

SERVICES_JSON_IN_ARR

Marker constant for Services_JSON::decode(), used to flag stack state

« More »

SERVICES_JSON_IN_OBJ

Marker constant for Services_JSON::decode(), used to flag stack state

« More »

SERVICES_JSON_IN_CMT

Marker constant for Services_JSON::decode(), used to flag stack state

« More »

SERVICES_JSON_LOOSE_TYPE

Behavior switch for Services_JSON::decode()

« More »

SERVICES_JSON_SUPPRESS_ERRORS

Behavior switch for Services_JSON::decode()

« More »

Classes, interfaces and traits

Services_JSON

Converts to and from JSON format.

Brief example of use: <code> // 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); </code>
« More »

Services_JSON_Error

« More »