Class Decoder

Summary

Fully Qualified Name: Laminas\Json\Decoder

Description

Decode JSON encoded string to PHP variable constructs

Methods

Name Description Defined By
decode() Decode a JSON source string. Decoder
decodeUnicodeString() Decode Unicode Characters from \u0000 ASCII syntax. Decoder

Method Details

decode()

Decode a JSON source string.

Decodes a JSON encoded string; the value returned will be one of the following:

By default, decoded objects will be returned as a stdClass object; to return associative arrays instead, pass {@link Json::TYPE_ARRAY} to the $objectDecodeType parameter.

Parameter Name Type Description
$source string String
$objectDecodeType int How

Returns: mixed

decodeUnicodeString()

Decode Unicode Characters from \u0000 ASCII syntax.

This algorithm was originally developed for the Solar Framework by Paul M. Jones

Parameter Name Type Description
$chrs string

Returns: string

Top