Gui\Ipc\Receiver::jsonDecode PHP Méthode

jsonDecode() protected méthode

Decode a received message
protected jsonDecode ( string $json ) : MessageInterface | void
$json string Received json message
Résultat MessageInterface | void
    protected function jsonDecode($json)
    {
        $obj = @json_decode($json);
        if (json_last_error() !== JSON_ERROR_NONE) {
            $strErr = 'JSON ERROR: ' . $json;
            if ($this->application->getVerboseLevel() == 2) {
                Output::err($strErr);
            }
            throw new ComponentException($strErr);
        }
        return $obj;
    }