decode()
decodeUnicodeString()
__construct()
_decodeArray()
_decodeObject()
_decodeValue()
_eatWhitespace()
_getNextToken()
_utf162utf8()
$decodeType
$offset
$source
$sourceLength
$token
$tokenValue
COLON
COMMA
DATUM
EOF
LBRACE
LBRACKET
RBRACE
RBRACKET
Decode JSON encoded string to PHP variable constructs
decode(string $source, int $objectDecodeType) : mixed
Decodes a JSON encoded string. The value returned will be one of the following: - integer - float - boolean - null - stdClass - array - array of one or more of the above types
By default, decoded objects will be returned as associative arrays; to return a stdClass object instead, pass Zend\Json\Json::TYPE_OBJECT to the $objectDecodeType parameter.
static | |
---|---|
access | public |
string
String to be decoded
int
How objects should be decoded; should be either or {@link Zend\Json\Json::TYPE_ARRAY} or {@link Zend\Json\Json::TYPE_OBJECT}; defaults to TYPE_ARRAY
mixed
decodeUnicodeString(string $chrs) : string
This algorithm was originally developed for the Solar Framework by Paul M. Jones
link | http://solarphp.com/ |
---|---|
link | https://github.com/solarphp/core/blob/master/Solar/Json.php |
string
string
__construct(string $source, int $decodeType)
string
String source to decode
int
How objects should be decoded -- see {@link Zend\Json\Json::TYPE_ARRAY} and {@link Zend\Json\Json::TYPE_OBJECT} for valid values
\Zend\Json\Exception\InvalidArgumentException |
---|
_decodeArray() : array
_decodeObject() : array | \stdClass
..}
If Zend\Json\Encoder was used to encode the original object then a special attribute called __className which specifies a class name that should wrap the data contained within the encoded source.
Decodes to either an array or stdClass object, based on the value of $decodeType. If invalid $decodeType present, returns as an array.
\Zend\Json\Exception\RuntimeException |
---|
array
\stdClass
_decodeValue() : mixed
mixed
_eatWhitespace()
_getNextToken() : int
\Zend\Json\Exception\RuntimeException |
---|
int
Token constant value specified in class definition_utf162utf8(string $utf16) : string
Normally should be handled by mb_convert_encoding, but provides a slower PHP-only method for installations that lack the multibyte string extension.
This method is from the Solar Framework by Paul M. Jones
link | http://solarphp.com |
---|
string
UTF-16 character
string
UTF-8 character$decodeType : int
access | protected |
---|
$offset : int
$source : string
$sourceLength : int
$token : int
$tokenValue : \Zend\Json\$_tokenValue
COLON
COMMA
DATUM
EOF
These are not for public consumption, they are just used internally to the class.
LBRACE
LBRACKET
RBRACE
RBRACKET