public function getArray()
    {
        $arr = array('jsonrpc' => self::JSON_RPC_VERSION, 'method' => $this->method);
        if ($this->params) {
            $arr['params'] = $this->params;
        }
        if ($this->id !== null) {
            $arr['id'] = $this->id;
        }
        return $arr;
    }