decode() public static method
Decodes the given JSON string into a PHP data structure.
| public static mixed decode ( $json, $asArray = true ) | ||
|---|---|---|
| $json | string |
The JSON string to be decoded |
| $asArray | boolean |
Whether to return objects in terms of associative arrays. |
| return | mixed |
The PHP data |
| throws | yii\base\InvalidParamException |
if there is any decoding error |
Please login to continue.