FreenetIS
 All Classes Namespaces Functions Variables Pages
Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Zend_Json Class Reference

Static Public Member Functions

static decode ($encodedValue, $objectDecodeType=Zend_Json::TYPE_ARRAY)
 Decodes the given $encodedValue string which is encoded in the JSON format.
static encode ($valueToEncode, $cycleCheck=false)
 Encode the mixed $valueToEncode into the JSON format.

Public Attributes

const TYPE_ARRAY = 1
 How objects should be encoded – arrays or as StdClass.
const TYPE_OBJECT = 0

Static Public Attributes

static $useBuiltinEncoderDecoder = false

Member Function Documentation

static Zend_Json::decode (   $encodedValue,
  $objectDecodeType = Zend_Json::TYPE_ARRAY 
)
static

Decodes the given $encodedValue string which is encoded in the JSON format.

Uses ext/json's json_decode if available.

Parameters
string$encodedValueEncoded in JSON format
int$objectDecodeTypeOptional; flag indicating how to decode objects. See ZJsonDecoder::decode() for details.
Returns
mixed
static Zend_Json::encode (   $valueToEncode,
  $cycleCheck = false 
)
static

Encode the mixed $valueToEncode into the JSON format.

Encodes using ext/json's json_encode() if available.

NOTE: Object should not contain cycles; the JSON format does not allow object reference.

NOTE: Only public variables will be encoded

Parameters
mixed$valueToEncode
boolean$cycleCheckOptional; whether or not to check for object recursion; off by default
Returns
string JSON encoded object

Member Data Documentation

const Zend_Json::TYPE_ARRAY = 1

How objects should be encoded – arrays or as StdClass.

TYPE_ARRAY is 1 so that it is a boolean true value, allowing it to be used with ext/json's functions.


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