Implemented basic json-rpc support.