public function toArray()
    {
        $json            = [];
        $json['jsonrpc'] = $this->jsonrpc;

        if ($this->method) {
            $json['method'] = $this->method;
        }

        $json['method'] = $this->method;

        if ($this->params) {
            $json['params'] = $this->params;
        }

        if ($this->id) {
            $json['id'] = $this->id;
        }

        return $json;
    }
public function toArray()
    {
        $json            = [];
        $json['jsonrpc'] = $this->jsonrpc;

        if ($this->method) {
            $json['method'] = $this->method;
        }

        $json['method'] = $this->method;

        if ($this->params) {
            $json['params'] = $this->params;
        }

        if ($this->id) {
            $json['id'] = $this->id;
        }

        return $json;
    }
public function toArray ( ) { $ json = [ ] ; $ json [ 'jsonrpc' ] = $ this -> jsonrpc ; if ( $ this -> method ) { $ json [ 'method' ] = $ this -> method ; } $ json [ 'method' ] = $ this -> method ; if ( $ this -> params ) { $ json [ 'params' ] = $ this -> params ; } if ( $ this -> id ) { $ json [ 'id' ] = $ this -> id ; } return $ json ; }
Convert JsonRequest to json string.

@return array
Convert JsonRequest to json string .