jsonrpc: support positional arguments, fix #6
add docstring
fix race condition
rename a var
fmt