Class yii\httpclient\JsonParser

Inheritanceyii\httpclient\JsonParser » yii\base\BaseObject
Implementsyii\httpclient\ParserInterface
Available since version2.0

JsonParser parses HTTP message content as JSON.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$asArray boolean Whether to return objects in terms of associative arrays. yii\httpclient\JsonParser

Public Methods

Hide inherited methods

MethodDescriptionDefined By
parse() Parses given HTTP response instance. yii\httpclient\JsonParser

Property Details

$asArray public property (available since version 2.0.8)

Whether to return objects in terms of associative arrays.

public boolean $asArray true

Method Details

parse() public method

Parses given HTTP response instance.

public mixed parse ( yii\httpclient\Response $response )
$response yii\httpclient\Response

HTTP response instance.

return mixed

Parsed content data.