The methods 'request' and 'notify' of the class 'RPCClient' in 'rpc.py' use an empty array as default value for 'params'.
The specification states: "This member MAY be omitted."
With a default value of 'None' the following code (with ugly repetition?) would send better requests without parameters:
if params is None:
self.writer.write_value({'jsonrpc': '2.0', 'method': method, 'id': request_id})
else:
self.writer.write_value({'jsonrpc': '2.0', 'method': method, 'params': params, 'id': request_id})
and
if params is None:
self.writer.write_value({'method': method})
else:
self.writer.write_value({'method': method, 'params': params})
(By the way: the 'jsonrpc': '2.0' part is currently missing for notifications.)
The methods 'request' and 'notify' of the class 'RPCClient' in 'rpc.py' use an empty array as default value for 'params'.
The specification states: "This member MAY be omitted."
With a default value of 'None' the following code (with ugly repetition?) would send better requests without parameters:
and
(By the way: the 'jsonrpc': '2.0' part is currently missing for notifications.)