PHP Class yii\web\JsonParser
To enable parsing for JSON requests you can configure [[Request::parsers]] using this class:
php
'request' => [
'parsers' => [
'application/json' => 'yii\web\JsonParser',
]
]
ファイルを表示
Open project: yiisoft/yii2
Class Usage Examples
Public Properties
Public Methods
Method Details
Parses a HTTP request body.
public parse ( string $rawBody, string $contentType ) : array |
$rawBody |
string |
the raw HTTP request body. |
$contentType |
string |
the content type specified for the request body. |
return |
array |
parameters parsed from the request body |
Property Details
$asArray public_oe property
whether to return objects in terms of associative arrays.
$throwException public_oe property