Added support for json-rpc